Seizure / MonitorBoss

GNU Lesser General Public License v3.0
2 stars 1 forks source link

make full use of argparse functionality to check user input, rather than self-rolling #12

Open Seizure opened 7 months ago

Seizure commented 7 months ago

There's a lot of argparse functionality we aren't using right now, which might accomplish error checking we do or need to do

eg: https://docs.python.org/3/library/argparse.html#choices for limiting possible choices could be useful for valid attributes

or eg: https://docs.python.org/3/library/argparse.html#argparse-type for automatic type checking

Rangi42 commented 2 months ago

In at least some of these cases, we're better off just hand-rolling things.

For example, using choices would be a chicken-and-egg problem: the valid choices for things like monitor IDs/aliases depend on the cfg, but cfg is initialized based on a CLI argument!