v3.2.0
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
- Old:
-
@proto.prefixControls CLI Prefix Requirement: Classes decorated with@proto.prefixrequire prefixed CLI syntax- Regular dataclasses:
--epochs 200(unprefixed) @proto.prefixclasses:--config.epochs 200(prefixed required)
- Regular dataclasses:
Bug Fixes
isinstance()for@proto.prefixInstances: Fixedisinstance(instance, DecoratedClass)returningFalse- Instances of
@proto.prefixdecorated classes now correctly pass isinstance checks - Enables proper type checking in Union subcommand handlers
- Instances of
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