For c4ad472
Solving the above will force most of the other problems to be solved, but here are some others that popped up
|
raise UnclosedQuote("Missing closing quote.") |
Removing items from the middle of a list is a very slow method of skipping through elements.
|
if not arg.startswith("--"): continue |
The difference between flags and options in your parser seems to be the prefix - - and -- (hardcoded at the moment) This is not convention - it is more generally expected that a single dash is used for the shorthand of either an option (-m=utf) or a flag (-f)
|
self.options = options |
|
self.options_aliases = options_aliases |
|
self.flags = flags |
|
self.flags_aliases = flags_aliases |
This data structure is larger than necessary, forcing consumers to use both dictionaries. It would be better to choose one - either iteration through values that declared their aliases or a map of all flags, with some keys holding identical values.
|
ctx = {type(a): a for a in ctx} |
This form of lookup precludes a major use of these context annotations - subclassing. As we drop all information about the mro to do a property access, only the direct constructor of the value is relevant.
|
raise Exception("BRUH") # TODO: do custom error class |
Yeah, do. This is a decent chunk of the library just missing
For c4ad472
Solving the above will force most of the other problems to be solved, but here are some others that popped up
Actioneer/actioneer/performer.py
Line 50 in 874ddc1
Actioneer/actioneer/performer.py
Line 70 in 874ddc1
Removing items from the middle of a list is a very slow method of skipping through elements.
Actioneer/actioneer/performer.py
Line 66 in 874ddc1
The difference between flags and options in your parser seems to be the prefix -
-and--(hardcoded at the moment) This is not convention - it is more generally expected that a single dash is used for the shorthand of either an option (-m=utf) or a flag (-f)Actioneer/actioneer/action.py
Lines 19 to 22 in 874ddc1
This data structure is larger than necessary, forcing consumers to use both dictionaries. It would be better to choose one - either iteration through values that declared their aliases or a map of all flags, with some keys holding identical values.
Actioneer/actioneer/action.py
Line 33 in 874ddc1
This form of lookup precludes a major use of these context annotations - subclassing. As we drop all information about the mro to do a property access, only the direct constructor of the value is relevant.
Actioneer/actioneer/performer.py
Line 32 in 874ddc1
Yeah, do. This is a decent chunk of the library just missing