Home | History | Annotate | Download | only in test

Lines Matching defs:Sig

58 class Sig(object):
146 argument_signatures -- a list of Sig objects which specify
163 cls.parser_signature = Sig()
172 for sig in argument_signatures:
173 parser.add_argument(*sig.args, **sig.kwargs)
178 for sig in argument_signatures:
179 group.add_argument(*sig.args, **sig.kwargs)
183 for i, sig in enumerate(argument_signatures):
185 group.add_argument(*sig.args, **sig.kwargs)
264 argument_signatures = [Sig('-x')]
279 Sig('-x', action='store_true'),
280 Sig('-yyy', action='store_const', const=42),
281 Sig('-z'),
304 argument_signatures = [Sig('-foo')]
318 argument_signatures = [Sig('-f'), Sig('-foobar'), Sig('-foorab')]
334 argument_signatures = [Sig('-foobar'), Sig('-foorab')]
350 argument_signatures = [Sig('-1', dest='one')]
363 argument_signatures = [Sig('--foo')]
378 Sig('--badger', action='store_true'),
379 Sig('--bat'),
396 Sig('--badger', action='store_true'),
397 Sig('--ba'),
415 Sig('-f', action='store_true'),
416 Sig('--bar'),
417 Sig('-baz', action='store_const', const=42),
433 parser_signature = Sig(prefix_chars='+:/', add_help=False)
435 Sig('+f', action='store_true'),
436 Sig('::bar'),
437 Sig('/baz', action='store_const', const=42),
455 parser_signature = Sig(prefix_chars='+:/', add_help=True)
457 Sig('+f', action='store_true'),
458 Sig('::bar'),
459 Sig('/baz', action='store_const', const=42),
475 parser_signature = Sig(prefix_chars='+-', add_help=False)
477 Sig('-x', action='store_true'),
478 Sig('+y', action='store_true'),
479 Sig('+z', action='store_true'),
499 Sig('-v', '--verbose', '-n', '--noisy', action='store_true'),
514 argument_signatures = [Sig('--foo-bar'), Sig('--baz', dest='zabbaz')]
527 argument_signatures = [Sig('-x'), Sig('-y', default=42)]
539 argument_signatures = [Sig('-x')]
550 argument_signatures = [Sig('-x', nargs=1)]
561 argument_signatures = [Sig('-x', nargs=3)]
573 Sig('-w', nargs='?'),
574 Sig('-x', nargs='?', const=42),
575 Sig('-y', nargs='?', default='spam'),
576 Sig('-z', nargs='?', type=int, const='42', default='84'),
596 Sig('-x', nargs='*'),
597 Sig('-y', nargs='*', default='spam'),
615 Sig('-x', nargs='+'),
616 Sig('-y', nargs='+', default='spam'),
632 Sig('-f', choices='abc'),
633 Sig('-g', type=int, choices=range(5))]
649 Sig('-x', type=int, required=True),
661 argument_signatures = [Sig('-x', action='store')]
672 argument_signatures = [Sig('-y', action='store_const', const=object)]
683 argument_signatures = [Sig('-z', action='store_false')]
694 argument_signatures = [Sig('--apple', action='store_true')]
705 argument_signatures = [Sig('--baz', action='append')]
717 argument_signatures = [Sig('--baz', action='append', default=['X'])]
730 Sig('-b', action='append_const', const=Exception),
731 Sig('-c', action='append', dest='b'),
745 Sig('-b', action='append_const', const=Exception, default=['X']),
746 Sig('-c', action='append', dest='b'),
759 argument_signatures = [Sig('-x', action='count')]
774 argument_signatures = [Sig('foo')]
784 argument_signatures = [Sig('foo', nargs=1)]
794 argument_signatures = [Sig('foo', nargs=2)]
804 argument_signatures = [Sig('foo', nargs='*')]
816 argument_signatures = [Sig('foo', nargs='*', default='bar')]
828 argument_signatures = [Sig('foo', nargs='+')]
839 argument_signatures = [Sig('foo', nargs='?')]
850 argument_signatures = [Sig('foo', nargs='?', default=42)]
864 Sig('foo', nargs='?', type=int, default='42'),
876 argument_signatures = [Sig('foo'), Sig('bar')]
886 argument_signatures = [Sig('foo'), Sig('bar', nargs=1)]
896 argument_signatures = [Sig('foo', nargs=2), Sig('bar')]
906 argument_signatures = [Sig('foo'), Sig('bar', nargs='*')]
918 argument_signatures = [Sig('foo'), Sig('bar', nargs='+')]
929 argument_signatures = [Sig('foo'), Sig('bar', nargs='?')]
940 argument_signatures = [Sig('foo', nargs='*'), Sig('bar')]
952 argument_signatures = [Sig('foo', nargs='+'), Sig('bar')]
963 argument_signatures = [Sig('foo', nargs='?', default=42), Sig('bar')]
974 argument_signatures = [Sig('foo', nargs=2), Sig('bar', nargs='*')]
985 argument_signatures = [Sig('foo', nargs=2), Sig('bar', nargs='+')]
995 argument_signatures = [Sig('foo', nargs=2), Sig('bar', nargs='?')]
1006 argument_signatures = [Sig('foo', nargs='*'), Sig('bar', nargs=1)]
1018 argument_signatures = [Sig('foo', nargs='+'), Sig('bar', nargs=1)]
1029 argument_signatures = [Sig('foo', nargs='?'), Sig('bar', nargs=1)]
1041 Sig('foo'),
1042 Sig('bar', nargs='*'),
1043 Sig('baz', nargs=1),
1056 Sig('foo'),
1057 Sig('bar', nargs='+'),
1058 Sig('baz', nargs=1),
1071 Sig('foo'),
1072 Sig('bar', nargs='?', default=0.625),
1073 Sig('baz', nargs=1),
1086 Sig('foo', nargs='?'),
1087 Sig('bar', nargs='?', default=42),
1100 argument_signatures = [Sig('foo', nargs='?'), Sig('bar', nargs='*')]
1113 argument_signatures = [Sig('foo', nargs='?'), Sig('bar', nargs='+')]
1125 argument_signatures = [Sig('spam', choices=set('abcdefg'))]
1136 argument_signatures = [Sig('spam', type=int, choices=range(20))]
1148 Sig('spam', action='append'),
1149 Sig('spam', action='append', nargs=2),
1164 Sig('x', nargs='?'),
1165 Sig('-4', dest='y', action='store_true'),
1180 Sig('x', nargs='?'),
1181 Sig('-k4', dest='y', action='store_true'),
1196 Sig('x', nargs='?'),
1197 Sig('-y', '--yyy', dest='y'),
1214 parser_signature = Sig(prefix_chars='-+')
1216 Sig('-', dest='x', nargs='?', const='badger'),
1217 Sig('+', dest='y', type=int, default=42),
1218 Sig('-+-', dest='z', action='store_true'),
1234 argument_signatures = [Sig('-x', nargs='*'), Sig('y', nargs='*')]
1250 argument_signatures = [Sig('x'), Sig('y', nargs='...'), Sig('-z')]
1264 Sig('-x', type=float),
1265 Sig('-3', type=float, dest='y'),
1266 Sig('z', nargs='*'),
1291 Sig('foo', nargs='?', default=argparse.SUPPRESS),
1292 Sig('bar', nargs='*', default=argparse.SUPPRESS),
1293 Sig('--baz', action='store_true', default=argparse.SUPPRESS),
1309 parser_signature = Sig(argument_default=argparse.SUPPRESS)
1311 Sig('foo', nargs='?'),
1312 Sig('bar', nargs='*'),
1313 Sig('--baz', action='store_true'),
1329 parser_signature = Sig(argument_default=42, version='1.0')
1331 Sig('foo', nargs='?'),
1332 Sig('bar', nargs='*'),
1333 Sig('--baz', action='store_true'),
1363 parser_signature = Sig(fromfile_prefix_chars='@')
1365 Sig('-a'),
1366 Sig('x'),
1367 Sig('y', nargs='+'),
1402 parser_signature = Sig(fromfile_prefix_chars='@')
1404 Sig('y', nargs='+'),
1458 Sig('-x', type=argparse.FileType()),
1459 Sig('spam', type=argparse.FileType('r')),
1479 Sig('-c', type=argparse.FileType('r'), default='no-file.txt'),
1498 Sig('-x', type=argparse.FileType('rb')),
1499 Sig('spam', type=argparse.FileType('rb')),
1539 Sig('-x', type=argparse.FileType('w')),
1540 Sig('spam', type=argparse.FileType('w')),
1555 Sig('-x', type=argparse.FileType('wb')),
1556 Sig('spam', type=argparse.FileType('wb')),
1571 Sig('--eggs', type=complex),
1572 Sig('spam', type=float),
1596 Sig('-x', type=MyType),
1597 Sig('spam', type=MyType),
1620 Sig('-x', type=C),
1621 Sig('spam', type=C),
1706 Sig('-s', dest='spam', action=OptionalAction,
1708 Sig('badger', action=PositionalAction,
2907 parser_signature = Sig(prog='PROG', description='DESCRIPTION',
2910 Sig('-x', action='store_true', help='X HELP'),
2911 Sig('--y', help='Y HELP'),
2912 Sig('foo', help='FOO HELP'),
2913 Sig('bar', help='BAR HELP'),
2943 parser_signature = Sig(prog='PROG', description='DESCRIPTION',
2946 Sig('-x', action='store_true', help='X HELP'),
2947 Sig('--y', help='Y HELP'),
2948 Sig('foo', help='FOO HELP'),
2949 Sig('bar', help='BAR HELP'),
2952 (Sig('GROUP TITLE', description='GROUP DESCRIPTION'), [
2953 Sig('baz', help='BAZ HELP'),
2954 Sig('-z', nargs='+', help='Z HELP')]),
2989 parser_signature = Sig(usage='USAGE', description='DESCRIPTION')
2991 Sig('-x', action='store_true', help='X HELP'),
2992 Sig('--y', help='Y HELP'),
2993 Sig('ekiekiekifekang', help='EKI HELP'),
2994 Sig('bar', help='BAR HELP'),
3020 parser_signature = Sig(
3028 Sig('-x', metavar='XX', help='oddly\n'
3030 Sig('y', metavar='yyy', help='normal y help'),
3033 (Sig('title', description='\n'
3037 [Sig('-a', action='store_true',
3072 parser_signature = Sig(prog='PROG', description= 'D\nD' * 30)
3074 Sig('-x', metavar='XX', help='XHH HX' * 20),
3075 Sig('y', metavar='yyy', help='YH YH' * 20),
3078 (Sig('ALPHAS'), [
3079 Sig('-a', action='store_true', help='AHHH HHA' * 10)]),
3112 parser_signature = Sig(usage='USAGE', description= 'D D' * 30,
3115 Sig('-x', metavar='X' * 25, help='XH XH' * 20),
3116 Sig('y', metavar='y' * 25, help='YH YH' * 20),
3119 (Sig('ALPHAS'), [
3120 Sig('-a', metavar='A' * 25, help='AH AH' * 20),
3121 Sig('z', metavar='z' * 25, help='ZH ZH' * 20)]),
3166 parser_signature = Sig(prog='PROG')
3168 Sig('-w', nargs='+', help='w'),
3169 Sig('-x', nargs='*', help='x'),
3170 Sig('a', help='a'),
3171 Sig('b', help='b', nargs=2),
3172 Sig('c', help='c', nargs='?'),
3175 (Sig('group'), [
3176 Sig('-y', nargs='?', help='y'),
3177 Sig('-z', nargs=3, help='z'),
3178 Sig('d', help='d', nargs='*'),
3179 Sig('e', help='e', nargs='+'),
3210 parser_signature = Sig(prog='PROG', add_help=False)
3213 (Sig('xxxx'), [
3214 Sig('-x', help='x'),
3215 Sig('a', help='a'),
3217 (Sig('yyyy'), [
3218 Sig('b', help='b'),
3219 Sig('-y', help='y'),
3241 parser_signature = Sig(prog='P' * 60)
3243 Sig('-w', metavar='W'),
3244 Sig('-x', metavar='X'),
3245 Sig('a'),
3246 Sig('b'),
3270 parser_signature = Sig(prog='P' * 60)
3272 Sig('-w', metavar='W' * 25),
3273 Sig('-x', metavar='X' * 25),
3274 Sig('-y', metavar='Y' * 25),
3275 Sig('-z', metavar='Z' * 25),
3276 Sig('a'),
3277 Sig('b'),
3306 parser_signature = Sig(prog='P' * 60, add_help=False)
3308 Sig('a' * 25),
3309 Sig('b' * 25),
3310 Sig('c' * 25),
3331 parser_signature = Sig(prog='PROG')
3333 Sig('-w', metavar='W' * 25),
3334 Sig('-x', metavar='X' * 25),
3335 Sig('-y', metavar='Y' * 25),
3336 Sig('-z', metavar='Z' * 25),
3337 Sig('a'),
3338 Sig('b'),
3339 Sig('c'),
3369 parser_signature = Sig(prog='PROG')
3371 Sig('-x'),
3372 Sig('-y'),
3373 Sig('-z'),
3374 Sig('a' * 25),
3375 Sig('b' * 25),
3376 Sig('c' * 25),
3403 parser_signature = Sig(prog='PROG')
3405 Sig('-x', metavar='X' * 25),
3406 Sig('-y', metavar='Y' * 25),
3407 Sig('-z', metavar='Z' * 25),
3408 Sig('a' * 25),
3409 Sig('b' * 25),
3410 Sig('c' * 25),
3439 parser_signature = Sig(prog='PROG')
3441 Sig('-x', metavar='X' * 25),
3442 Sig('-y', metavar='Y' * 25),
3443 Sig('-z', metavar='Z' * 25),
3465 parser_signature = Sig(prog='PROG', add_help=False)
3467 Sig('a' * 25),
3468 Sig('b' * 25),
3469 Sig('c' * 25),
3489 parser_signature = Sig(prog='PROG')
3491 Sig('-x', type=int,
3493 Sig('-y', action='store_const', default=42, const='XXX',
3495 Sig('--foo', choices='abc',
3497 Sig('--bar', default='baz', choices=[1, 2], metavar='BBB',
3499 Sig('spam', help='spam %(prog)s %(default)s'),
3500 Sig('badger', default=0.5, help='badger %(prog)s %(default)s'),
3503 (Sig('group'), [
3504 Sig('-a', help='a %(prog)s %(default)s'),
3505 Sig('-b', default=-1, help='b %(prog)s %(default)s'),
3535 parser_signature = Sig(prog='PROG', usage='%(prog)s FOO')
3552 parser_signature = Sig(prog='PROG', add_help=False)
3565 parser_signature = Sig(prog='PROG', usage=argparse.SUPPRESS)
3567 Sig('--foo', help='foo help'),
3568 Sig('spam', help='spam help'),
3586 parser_signature = Sig(prog='PROG', add_help=False)
3588 Sig('--foo', help=argparse.SUPPRESS),
3589 Sig('spam', help='spam help'),
3606 parser_signature = Sig(prog='PROG')
3608 Sig('--foo', help='foo help'),
3609 Sig('spam', help='spam help'),
3612 (Sig('group'), [Sig('--bar', help=argparse.SUPPRESS)]),
3632 parser_signature = Sig(prog='PROG')
3634 Sig('--foo', help='foo help'),
3635 Sig('spam', help=argparse.SUPPRESS),
3653 parser_signature = Sig(prog='PROG')
3655 Sig('--foo', required=True, help='foo help'),
3673 parser_signature = Sig(prog='PROG', prefix_chars='^;', add_help=False)
3675 Sig('^^foo', action='store_true', help='foo help'),
3676 Sig(';b', ';;bar', help='bar help'),
3694 parser_signature = Sig(prog='PROG', add_help=False)
3696 Sig('--foo', help='foo help'),
3697 Sig('spam', help='spam help'),
3717 parser_signature = Sig(prog='PROG', version='1.0')
3719 Sig('--foo', help='foo help'),
3720 Sig('spam', help='spam help'),
3744 parser_signature = Sig(prog='PROG')
3746 Sig('--foo'),
3747 Sig('spam'),
3768 parser_signature = Sig(prog='PROG')
3770 Sig('-w', help='w', nargs='+', metavar=('W1', 'W2')),
3771 Sig('-x', help='x', nargs='*', metavar=('X1', 'X2')),
3772 Sig('-y', help='y', nargs=3, metavar=('Y1', 'Y2', 'Y3')),
3773 Sig('-z', help='z', nargs='?', metavar=('Z1', )),
3795 parser_signature = Sig(
3803 Sig('--foo', help=' foo help should also\n'
3805 Sig('spam', help='spam help'),
3808 (Sig('title', description=' This text\n'
3811 [Sig('--bar', help='bar help')]),
3844 parser_signature = Sig(
3852 Sig('--foo', help=' foo help should not\n'
3854 Sig('spam', help='spam help'),
3857 (Sig('title', description=' This text\n'
3860 [Sig('--bar', help='bar help')]),
3892 parser_signature = Sig(
3897 Sig('--foo', help='foo help - oh and by the way, %(default)s'),
3898 Sig('--bar', action='store_true', help='bar help'),
3899 Sig('spam', help='spam help'),
3900 Sig('badger', nargs='?', default='wooden', help='badger help'),
3903 (Sig('title', description='description'),
3904 [Sig('--baz', type=int, default=42, help='baz help')]),
3932 parser_signature = Sig(prog='PROG', description='description')
3933 argument_signatures = [Sig('-V', '--version', action='version', version='3.6')]
3950 parser_signature = Sig(prog='PROG',
3954 subparsers_signatures = [Sig(name=name)
3979 parser_signature = Sig(prog='PROG',
3990 subparsers_signatures = [Sig(name=name, help=help)