gbp.git.args.GitArgs(object)
class documentationgbp.git.args
(View In Hierarchy)
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 |
Add args if condition is True
Parameters | condition | the condition to test (type: bool ) |
args | arguments to add |