-
Notifications
You must be signed in to change notification settings - Fork 3
Description
For c4ad472
- No test suite
- No linting
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
| raise UnclosedQuote("Missing closing quote.") |
- Variable doesn't exist
Actioneer/actioneer/performer.py
Line 70 in 874ddc1
| del inp[i] |
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
| 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)
Lines 19 to 22 in 874ddc1
| 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.
Line 33 in 874ddc1
| 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.
Actioneer/actioneer/performer.py
Line 32 in 874ddc1
| raise Exception("BRUH") # TODO: do custom error class |
Yeah, do. This is a decent chunk of the library just missing