Skip to content

v4.21.0

Choose a tag to compare

@BrianPugh BrianPugh released this 09 Jul 19:06
19ed511

Feature

  • Add Parameter.negative_alias to append extra names to a flag's negative form (e.g. a short -d) without dropping the generated --no-*/--empty-* names. Mirrors name/alias. By @BrianPugh in #859

Bug Fixes

  • Fix #857: a dataclass command with a default_factory field could raise a spurious "Input should be a valid list" validation error simply because pydantic was imported anywhere in the program. Factory defaults are now invoked during introspection, so the produced value (rather than the <factory> sentinel) is used as the default and shown in help text — consistent across dataclass, attrs, and pydantic. By @BrianPugh in #858

Full Changelog: v4.20.0...v4.21.0