Skip to content

v3.2.0

Choose a tag to compare

@geyang geyang released this 01 Feb 08:38
· 10 commits to main since this release

Features

  • Unprefixed CLI Subcommand Attributes: Subcommand attributes no longer require prefix by default

    • Old: python train.py train-config --config.epochs 200
    • New: python train.py train-config --epochs 200
    • Prefixed syntax still works for backwards compatibility
  • @proto.prefix Controls CLI Prefix Requirement: Classes decorated with @proto.prefix require prefixed CLI syntax

    • Regular dataclasses: --epochs 200 (unprefixed)
    • @proto.prefix classes: --config.epochs 200 (prefixed required)

Bug Fixes

  • isinstance() for @proto.prefix Instances: Fixed isinstance(instance, DecoratedClass) returning False
    • Instances of @proto.prefix decorated classes now correctly pass isinstance checks
    • Enables proper type checking in Union subcommand handlers

Testing

  • Added comprehensive nested CLI subcommand tests (test_nested_cli.py)
  • Added parallel test execution with pytest-xdist
  • Run tests in parallel: pytest -n auto