Jaymon / captain

command line python scripts for humans
MIT License
13 stars 1 forks source link

Normalizing kwargs #78

Closed Jaymon closed 3 months ago

Jaymon commented 1 year ago

If I just do something like this:

class Default(Command):
    def handle(self, **kwargs):
         self.output.out(kwargs["foo"])
         self.output.out(type(kwargs["foo"]))

And then run it:

$ python <SCRIPT-PATH> --foo=True
True
<class 'str'>

There should be a way to normalize all the flags in kwargs to their actual values