$ python decorator_inherit.py
USAGE decorator_inherit.py [-h] decorator_inherit.py <subcommand> [ARGUMENTS ...]decorator_inherit.py --help for more information$ python decorator_inherit.py sub
-------before execution-------Execution-------after execution-------
This makes the decorator only be executed when running a child of the command
it decorates, and not the command itself. This is especially useful with the
root command object because by default, any decorator that decorates it (with inheritance on) will be executed twice: once for the global callback, and once fot the actual command's callback.
If this behavior is undesired, the decorator can be made non-inhertibale by setting inherit=False