lebrice / SimpleParsing

Simple, Elegant, Typed Argument Parsing with argparse
MIT License
401 stars 50 forks source link

Changes to allow Extensibility #92

Closed haydenflinner closed 2 years ago

haydenflinner commented 2 years ago

For example, I use these hooks to do the help doc that I prefer:

class DataclassWrapper(DataclassWrapper_):
    @property
    def title(self) -> str:
        return self.dataclass.__qualname__

    @property
    def description(self) -> str:
        # TODO Don't show dataclass default __doc__
        return self.dataclass.__doc__ or ""
haydenflinner commented 2 years ago

Good idea on both counts, done!