Handle arguments to git commands

>>> GitArgs('-h', '--no-foo').args
['-h', '--no-foo']
>>> GitArgs('-n', 123).args
['-n', '123']
>>> GitArgs().add('--more-foo', '--less-bar').args
['--more-foo', '--less-bar']
>>> GitArgs().add(['--foo', '--bar']).args
['--foo', '--bar']
>>> GitArgs().add_cond(1 > 2, '--opt', '--no-opt').args
['--no-opt']
>>> GitArgs().add_true(True, '--true').args
['--true']
>>> GitArgs().add_false(True, '--true').args
[]
>>> GitArgs().add_false(False, '--false').args
['--false']
Method __init__ Undocumented
Method args Undocumented
Method add Add arguments to argument list
Method add_true Add args if condition is True
Method add_false Add args if condition is False
Method add_cond Add option opt to alist if condition is True else add noopt.
Instance Variable _args Undocumented
def __init__(self, *args):
Undocumented
_args =
Undocumented
(type: List)
@property
def args(self):
Undocumented
def add(self, *args):

Add arguments to argument list

def add_true(self, condition, *args):

Add args if condition is True

Parametersconditionthe condition to test (type: bool)
argsarguments to add
def add_false(self, condition, *args):

Add args if condition is False

Parametersconditionthe condition to test (type: bool)
argsarguments to add
def add_cond(self, condition, opt, noopt=[]):

Add option opt to alist if condition is True else add noopt.

Parametersconditioncondition (type: bool)
optoption to add if condition is True (type: str or list)
nooptoption to add if condition is False (type: str or list)
API Documentation for git-buildpackage, generated by pydoctor at 2021-02-01 08:15:22.