Added
- Subcommand aliases: set
_parseraliases_on anArgssubclass to register
short/alternate names for it in a_subcommands_tree (e.g._parseraliases_ = ["c"]soapp cruns the same command asapp create). Aliases dispatch to the
same__call__. Absence of the attr is the unchanged default (no aliases). __version__fallback for--version: when_version_is unset, a
class-level__version__string is now used to populate the--versionflag, so
an app already carrying the conventional__version__gets--versionfor free.
_version_still wins when both are set (and remains the only form that accepts
theduho.AUTOsentinel).
Changed
- BREAKING: the command-dispatch hook is renamed from
__run__to__call__.
AnArgsinstance is now directly callable —instance()runs the command —
andduho.main()dispatches toinstance.__call__(). Renamedef __run__(self)
todef __call__(self)on your command classes.
Full Changelog: v0.1.1...v0.2.0