Skip to content

Improvements to boolean flags

Compare
Choose a tag to compare
@mpkocher mpkocher released this 23 Aug 05:01
· 82 commits to master since this release
2ca496f
  • backward incompatible changes to how boolean flags are handled
  • Common/Vanilla case of debug:bool = False can be customized with (-d, --debug) to negate the default value.
  • Required x:bool, or x:Optional[bool], x:Optional[bool] = None semantics remain the same with (--enable-x, --disable-x) format.
  • Use Pydantic's Field instead of Config.CLI_EXTRA_OPTIONS to have one consistent model
  • Improve help messages by adding better type description and explicitly display if a field is required