def arg(*args, **kwargs):
    """Decorator for adding command line argument.

    The `args` and `kwargs` will eventually be passed to
    `ArgumentParser.add_argument`.

    If `kwargs` has an `envvar` key, then the default value for the
    command line argument will be taken from the environment variable
    with this name.

    The default value is automatically added to the help string. We do
    it here instead of using argparse.ArgumentDefaultsHelpFormatter
    since we format the help in more than one place (cmdline and
    Sphinx doc).
    """
    envvar = kwargs.get('envvar')
    if envvar:
        del kwargs['envvar']
        # The default value is shown in the generated documentation.
        # We therefore only set it if we're not building the
        # documentation with tox.
        if os.environ not in '_TOX_SPHINX':
            kwargs['default'] = os.environ.get(envvar)
        kwargs['help'] += ' (default: $%s)' % envvar
    else:
        if 'default' in kwargs:
            kwargs['help'] += ' (default: %s)' % kwargs['default']

    def decorator(func):
        if not hasattr(func, '_args'):
            func._args = []
        func._args.append((args, kwargs))
        return func
    return decorator
dataset/ETHPy150Open zerovm/zerovm-cli/zpmlib/commands.py/arg/swapped operands of `not in`