-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
109 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
|
||
class ConvertingError(Exception): | ||
"""Raised when converting a argument failed""" | ||
|
||
|
||
class NoClosingQuote(Exception): | ||
"""No closing quote on your command arguments""" | ||
|
||
|
||
class NoCommandFound(Exception): | ||
"""No command has been found with that name""" | ||
|
||
|
||
class AlreadyAActionWithThatName(Exception): | ||
"""When A Action is trying to be created with a name of a Action | ||
with the same name""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
class Flags: | ||
def __init__(self, flags): self._flags = flags | ||
def __len__(self): return len(self._flags) | ||
def __getitem__(self, key): return self._flags[key] | ||
def __iter__(self): return iter(self._flags) | ||
def __reversed__(): return reversed(self._flags) | ||
def __contains__(self, k): return k in self._flags | ||
def __repr__(self): return repr(self._flags) | ||
def __init__(self, flags): | ||
self._flags = flags | ||
|
||
def __len__(self): | ||
return len(self._flags) | ||
|
||
def __getitem__(self, key): | ||
return self._flags[key] | ||
|
||
def __iter__(self): | ||
return iter(self._flags) | ||
|
||
def __reversed__(self): | ||
return reversed(self._flags) | ||
|
||
def __contains__(self, k): | ||
return k in self._flags | ||
|
||
def __str__(self): | ||
return str(self._flags) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
class Options: | ||
def __init__(self, options): self._options = options | ||
def __len__(self): return len(self._options) | ||
def __getitem__(self, key): return self._options[key] | ||
def __iter__(self): return iter(self._options) | ||
def __reversed__(): return reversed(self._options) | ||
def __contains__(self, k): return k in self._options | ||
def __repr__(self): return repr(self._options) | ||
def __init__(self, options): | ||
self._options = options | ||
|
||
def __len__(self): | ||
return len(self._options) | ||
|
||
def __getitem__(self, key): | ||
return self._options[key] | ||
|
||
def __iter__(self): | ||
return iter(self._options) | ||
|
||
def __reversed__(self): | ||
return reversed(self._options) | ||
|
||
def __contains__(self, k): | ||
return k in self._options | ||
|
||
def __str__(self): | ||
return str(self._options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters