• Home
  • Raw
  • Download

Lines Matching full:help

453 …= ['--bar', '-fbar', '-b B', 'B', '-f', '--bar B', '-baz', '-h', '--help', '+h', '::help', '/help']
465 """When ``-`` not in prefix_chars, default operators created for help
2010 prefix_chars[0] * 2 + 'foo', action='store_true', help='foo help')
2015 '--foo', action='store_true', help='foo help')
2017 'bar', type=float, help='bar help')
2025 subparsers_kwargs['help'] = 'command help'
2032 parser1_kwargs['help'] = '1 help'
2036 parser1.add_argument('-w', type=int, help='w help')
2037 parser1.add_argument('x', choices='abc', help='x help')
2042 parser2_kwargs['help'] = '2 help'
2044 parser2.add_argument('-y', choices='123', help='y help')
2045 parser2.add_argument('z', type=complex, nargs='*', help='z help')
2050 parser3_kwargs['help'] = '3 help'
2052 parser3.add_argument('t', type=int, help='t help')
2053 parser3.add_argument('u', nargs='...', help='u help')
2190 bar bar help
2191 {1,2,3} command help
2194 -h, --help show this help message and exit
2195 --foo foo help
2199 # Make sure - is still used for help if it is a non-first prefix char
2209 bar bar help
2210 {1,2,3} command help
2213 -h, --help show this help message and exit
2214 ++foo foo help
2222 help='help message containing non-breaking spaces shall not '
2230 -h, --help show this help message and exit
2231 --non-breaking help message containing non-breaking spaces shall not
2241 help=' ')
2251 -h, --help show this help message and exit
2258 help='%(choices)s')
2268 -h, --help show this help message and exit
2281 bar bar help
2282 {1,2,3} command help
2285 +h, ++help show this help message and exit
2286 ++foo foo help
2299 bar bar help
2300 {1,2,3} command help
2301 1 1 help
2302 2 2 help
2303 3 3 help
2306 -h, --help show this help message and exit
2307 --foo foo help
2313 parser.add_argument('--foo', action='store_true', help='foo help')
2314 parser.add_argument('bar', help='bar help')
2316 description='command help',
2317 help='additional text')
2328 bar bar help
2331 -h, --help show this help message and exit
2332 --foo foo help
2335 command help
2352 {a,b,c} x help
2355 -h, --help show this help message and exit
2356 -w W w help
2366 z z help
2369 -h, --help show this help message and exit
2370 -y {1,2,3} y help
2398 bar bar help
2401 -h, --help show this help message and exit
2402 --foo foo help
2407 1 help
2408 2 2 help
2409 3 3 help
2589 -h, --help show this help message and exit
2619 -h, --help show this help message and exit
2664 -h, --help show this help message and exit
2718 help = self.usage_when_not_required + self.help
2719 self.assertEqual(format_help(), textwrap.dedent(help))
2723 help = self.usage_when_required + self.help
2724 self.assertEqual(format_help(), textwrap.dedent(help))
2732 group.add_argument('--bar', help='bar help')
2733 group.add_argument('--baz', nargs='?', const='Z', help='baz help')
2753 help = '''\ variable in TestMutuallyExclusiveSimple
2756 -h, --help show this help message and exit
2757 --bar BAR bar help
2758 --baz [BAZ] baz help
2766 parser.add_argument('--abcde', help='abcde help')
2767 parser.add_argument('--fghij', help='fghij help')
2769 group.add_argument('--klmno', help='klmno help')
2770 group.add_argument('--pqrst', help='pqrst help')
2794 help = '''\ variable in TestMutuallyExclusiveLong
2797 -h, --help show this help message and exit
2798 --abcde ABCDE abcde help
2799 --fghij FGHIJ fghij help
2800 --klmno KLMNO klmno help
2801 --pqrst PQRST pqrst help
2810 group.add_argument('-x', help=argparse.SUPPRESS)
2811 group.add_argument('-y', action='store_false', help='y help')
2830 help = '''\ variable in TestMutuallyExclusiveFirstSuppressed
2833 -h, --help show this help message and exit
2834 -y y help
2844 add('--spam', action='store_true', help=argparse.SUPPRESS)
2845 add('--badger', action='store_false', help=argparse.SUPPRESS)
2846 add('--bladder', help=argparse.SUPPRESS)
2867 help = '''\ variable in TestMutuallyExclusiveManySuppressed
2870 -h, --help show this help message and exit
2879 group.add_argument('--foo', action='store_true', help='FOO')
2880 group.add_argument('--spam', help='SPAM')
2881 group.add_argument('badger', nargs='*', default='X', help='BADGER')
2907 help = '''\ variable in TestMutuallyExclusiveOptionalAndPositional
2913 -h, --help show this help message and exit
2923 parser.add_argument('-x', action='store_true', help='x help')
2925 group.add_argument('-a', action='store_true', help='a help')
2926 group.add_argument('-b', action='store_true', help='b help')
2927 parser.add_argument('-y', action='store_true', help='y help')
2928 group.add_argument('-c', action='store_true', help='c help')
2949 help = '''\ variable in TestMutuallyExclusiveOptionalsMixed
2952 -h, --help show this help message and exit
2953 -x x help
2954 -a a help
2955 -b b help
2956 -y y help
2957 -c c help
2969 mutex_group.add_argument('--bar', help='bar help')
2970 mutex_group.add_argument('--baz', help='baz help')
2988 help = '''\ variable in TestMutuallyExclusiveInGroup
2991 -h, --help show this help message and exit
2996 --bar BAR bar help
2997 --baz BAZ baz help
3005 parser.add_argument('x', help='x help')
3006 parser.add_argument('-y', action='store_true', help='y help')
3008 group.add_argument('a', nargs='?', help='a help')
3009 group.add_argument('-b', action='store_true', help='b help')
3010 group.add_argument('-c', action='store_true', help='c help')
3029 help = '''\ variable in TestMutuallyExclusiveOptionalsAndPositionalsMixed
3032 x x help
3033 a a help
3036 -h, --help show this help message and exit
3037 -y y help
3038 -b b help
3039 -c c help
3064 help = '''\ variable in TestMutuallyExclusiveNested
3067 -h, --help show this help message and exit
3271 # Help formatting tests
3351 # add tests for {format,print}_{usage,help}
3353 ('help', 'stdout')]:
3361 """Make sure that argument help aligns when options are longer"""
3367 Sig('-x', action='store_true', help='X HELP'),
3368 Sig('--y', help='Y HELP'),
3369 Sig('foo', help='FOO HELP'),
3370 Sig('bar', help='BAR HELP'),
3376 help = usage + '''\ variable in TestHelpBiggerOptionals
3381 foo FOO HELP
3382 bar BAR HELP
3385 -h, --help show this help message and exit
3387 -x X HELP
3388 --y Y Y HELP
3419 help = usage + '''\ variable in TestShortColumns
3425 FOO HELP
3427 BAR HELP
3430 -h, --help
3432 help
3442 X HELP
3444 Y HELP
3452 """Make sure that argument help aligns when options are longer"""
3458 Sig('-x', action='store_true', help='X HELP'),
3459 Sig('--y', help='Y HELP'),
3460 Sig('foo', help='FOO HELP'),
3461 Sig('bar', help='BAR HELP'),
3465 Sig('baz', help='BAZ HELP'),
3466 Sig('-z', nargs='+', help='Z HELP')]),
3471 help = usage + '''\ variable in TestHelpBiggerOptionalGroups
3476 foo FOO HELP
3477 bar BAR HELP
3480 -h, --help show this help message and exit
3482 -x X HELP
3483 --y Y Y HELP
3488 baz BAZ HELP
3489 -z Z [Z ...] Z HELP
3499 """Make sure that help aligns when arguments are longer"""
3503 Sig('-x', action='store_true', help='X HELP'),
3504 Sig('--y', help='Y HELP'),
3505 Sig('ekiekiekifekang', help='EKI HELP'),
3506 Sig('bar', help='BAR HELP'),
3512 help = usage + '''\ variable in TestHelpBiggerPositionals
3517 ekiekiekifekang EKI HELP
3518 bar BAR HELP
3521 -h, --help show this help message and exit
3522 -x X HELP
3523 --y Y Y HELP
3540 Sig('-x', metavar='XX', help='oddly\n'
3541 ' formatted -x help'),
3542 Sig('y', metavar='yyy', help='normal y help'),
3550 help=' oddly \n'
3551 'formatted -a help \n'
3558 help = usage + '''\ variable in TestHelpReformatting
3565 yyy normal y help
3568 -h, --help show this help message and exit
3569 -x XX oddly formatted -x help
3574 -a oddly formatted -a help again, so long that it should \
3586 Sig('-x', metavar='XX', help='XHH HX' * 20),
3587 Sig('y', metavar='yyy', help='YH YH' * 20),
3591 Sig('-a', action='store_true', help='AHHH HHA' * 10)]),
3596 help = usage + '''\ variable in TestHelpWrappingShortNames
3608 -h, --help show this help message and exit
3627 Sig('-x', metavar='X' * 25, help='XH XH' * 20),
3628 Sig('y', metavar='y' * 25, help='YH YH' * 20),
3632 Sig('-a', metavar='A' * 25, help='AH AH' * 20),
3633 Sig('z', metavar='z' * 25, help='ZH ZH' * 20)]),
3638 help = usage + '''\ variable in TestHelpWrappingLongNames
3651 -h, --help show this help message and exit
3680 Sig('-w', nargs='+', help='w'),
3681 Sig('-x', nargs='*', help='x'),
3682 Sig('a', help='a'),
3683 Sig('b', help='b', nargs=2),
3684 Sig('c', help='c', nargs='?'),
3685 Sig('--foo', help='Whether to foo', action=argparse.BooleanOptionalAction),
3686 Sig('--bar', help='Whether to bar', default=True,
3690 default=argparse.SUPPRESS, help='Bazz!'),
3694 Sig('-y', nargs='?', help='y'),
3695 Sig('-z', nargs=3, help='z'),
3696 Sig('d', help='d', nargs='*'),
3697 Sig('e', help='e', nargs='+'),
3707 help = usage + '''\ variable in TestHelpUsage
3715 -h, --help show this help message and exit
3739 Sig('-x', help='x'),
3740 Sig('a', help='a'),
3743 Sig('b', help='b'),
3744 Sig('-y', help='y'),
3750 help = usage + '''\ variable in TestHelpOnlyUserGroups
3778 help = usage + '''\ variable in TestHelpUsageLongProg
3785 -h, --help show this help message and exit
3812 help = usage + '''\ variable in TestHelpUsageLongProgOptionsWrap
3819 -h, --help show this help message and exit
3843 help = usage + '''\ variable in TestHelpUsageLongProgPositionalsWrap
3874 help = usage + '''\ variable in TestHelpUsageOptionalsWrap
3882 -h, --help show this help message and exit
3909 help = usage + '''\ variable in TestHelpUsagePositionalsWrap
3917 -h, --help show this help message and exit
3945 help = usage + '''\ variable in TestHelpUsageOptionalsPositionalsWrap
3953 -h, --help show this help message and exit
3976 help = usage + '''\ variable in TestHelpUsageOptionalsOnlyWrap
3979 -h, --help show this help message and exit
4001 help = usage + '''\ variable in TestHelpUsagePositionalsOnlyWrap
4012 """Test that variables are expanded properly in help messages"""
4017 help='x %(prog)s %(default)s %(type)s %%'),
4019 help='y %(prog)s %(default)s %(const)s'),
4021 help='foo %(prog)s %(default)s %(choices)s'),
4023 help='bar %(prog)s %(default)s %(dest)s'),
4024 Sig('spam', help='spam %(prog)s %(default)s'),
4025 Sig('badger', default=0.5, help='badger %(prog)s %(default)s'),
4029 Sig('-a', help='a %(prog)s %(default)s'),
4030 Sig('-b', default=-1, help='b %(prog)s %(default)s'),
4037 help = usage + '''\ variable in TestHelpVariableExpansion
4044 -h, --help show this help message and exit
4066 help = usage + '''\ variable in TestHelpVariableExpansionUsageSupplied
4069 -h, --help show this help message and exit
4083 help = usage variable in TestHelpVariableExpansionNoArguments
4092 Sig('--foo', help='foo help'),
4093 Sig('spam', help='spam help'),
4096 help = '''\ variable in TestHelpSuppressUsage
4098 spam spam help
4101 -h, --help show this help message and exit
4102 --foo FOO foo help
4109 """Test that optional arguments can be suppressed in help messages"""
4113 Sig('--foo', help=argparse.SUPPRESS),
4114 Sig('spam', help='spam help'),
4120 help = usage + '''\ variable in TestHelpSuppressOptional
4123 spam spam help
4129 """Test that optional groups can be suppressed in help messages"""
4133 Sig('--foo', help='foo help'),
4134 Sig('spam', help='spam help'),
4137 (Sig('group'), [Sig('--bar', help=argparse.SUPPRESS)]),
4142 help = usage + '''\ variable in TestHelpSuppressOptionalGroup
4145 spam spam help
4148 -h, --help show this help message and exit
4149 --foo FOO foo help
4155 """Test that positional arguments can be suppressed in help messages"""
4159 Sig('--foo', help='foo help'),
4160 Sig('spam', help=argparse.SUPPRESS),
4166 help = usage + '''\ variable in TestHelpSuppressPositional
4169 -h, --help show this help message and exit
4170 --foo FOO foo help
4180 Sig('--foo', required=True, help='foo help'),
4186 help = usage + '''\ variable in TestHelpRequiredOptional
4189 -h, --help show this help message and exit
4190 --foo FOO foo help
4200 Sig('^^foo', action='store_true', help='foo help'),
4201 Sig(';b', ';;bar', help='bar help'),
4207 help = usage + '''\ variable in TestHelpAlternatePrefixChars
4210 ^^foo foo help
4211 ;b BAR, ;;bar BAR bar help
4217 """Test that the --help argument can be suppressed help messages"""
4221 Sig('--foo', help='foo help'),
4222 Sig('spam', help='spam help'),
4228 help = usage + '''\ variable in TestHelpNoHelpOptional
4231 spam spam help
4234 --foo FOO foo help
4240 """Test that no errors occur if no help is specified"""
4251 help = usage + '''\ variable in TestHelpNone
4257 -h, --help show this help message and exit
4268 Sig('-w', help='w', nargs='+', metavar=('W1', 'W2')),
4269 Sig('-x', help='x', nargs='*', metavar=('X1', 'X2')),
4270 Sig('-y', help='y', nargs=3, metavar=('Y1', 'Y2', 'Y3')),
4271 Sig('-z', help='z', nargs='?', metavar=('Z1', )),
4278 help = usage + '''\ variable in TestHelpTupleMetavar
4281 -h, --help show this help message and exit
4301 Sig('--foo', help=' foo help should also\n'
4303 Sig('spam', help='spam help'),
4309 [Sig('--bar', help='bar help')]),
4314 help = usage + '''\ variable in TestHelpRawText
4322 spam spam help
4325 -h, --help show this help message and exit
4326 --foo FOO foo help should also
4334 --bar BAR bar help
4350 Sig('--foo', help=' foo help should not\n'
4352 Sig('spam', help='spam help'),
4358 [Sig('--bar', help='bar help')]),
4363 help = usage + '''\ variable in TestHelpRawDescription
4371 spam spam help
4374 -h, --help show this help message and exit
4375 --foo FOO foo help should not retain this odd formatting
4382 --bar BAR bar help
4395 Sig('--foo', help='foo help - oh and by the way, %(default)s'),
4396 Sig('--bar', action='store_true', help='bar help'),
4398 help='Whether to taz it', default=True),
4399 Sig('--quux', help="Set the quux", default=42),
4400 Sig('spam', help='spam help'),
4401 Sig('badger', nargs='?', default='wooden', help='badger help'),
4405 [Sig('--baz', type=int, default=42, help='baz help')]),
4412 help = usage + '''\ variable in TestHelpArgumentDefaults
4417 spam spam help
4418 badger badger help (default: wooden)
4421 -h, --help show this help message and exit
4422 --foo FOO foo help - oh and by the way, None
4423 --bar bar help (default: False)
4430 --baz BAZ baz help (default: 42)
4435 """Test the default help for the version action"""
4443 help = usage + '''\ variable in TestHelpVersionAction
4448 -h, --help show this help message and exit
4455 """Test that the --version argument can be suppressed in help messages"""
4460 help=argparse.SUPPRESS),
4461 Sig('--foo', help='foo help'),
4462 Sig('spam', help='spam help'),
4468 help = usage + '''\ variable in TestHelpVersionActionSuppress
4471 spam spam help
4474 -h, --help show this help message and exit
4475 --foo FOO foo help
4480 """Test ordering of subcommands in help matches the code"""
4492 help = usage + '''\ variable in TestHelpSubparsersOrdering
4500 -h, --help show this help message and exit
4509 """Test ordering of subcommands in help matches the code"""
4514 subcommand_data = (('a', 'a subcommand help'),
4515 ('b', 'b subcommand help'),
4516 ('c', 'c subcommand help'),
4517 ('d', 'd subcommand help'),
4518 ('e', 'e subcommand help'),
4521 subparsers_signatures = [Sig(name=name, help=help)
4522 for name, help in subcommand_data]
4528 help = usage + '''\ variable in TestHelpSubparsersWithHelpOrdering
4534 a a subcommand help
4535 b b subcommand help
4536 c c subcommand help
4537 d d subcommand help
4538 e e subcommand help
4541 -h, --help show this help message and exit
4565 help = usage + '''\ variable in TestHelpMetavarTypeFormatter
4573 -h, --help show this help message and exit
4725 help='FOO', metavar='BAR', dest='baz')
4731 self.assertEqual(action.help, 'FOO')
4759 parser.add_argument('-x', help='OLD X')
4760 parser.add_argument('-x', help='NEW X')
4765 -h, --help show this help message and exit
4775 -h, --help show this help message and exit
4782 # Help and Version option tests
4786 """Test the help and version actions"""
4800 self.assertPrintHelpExit(parser, '--help')
4814 self.assertArgumentParserError(parser, '--help')
4827 self.assertArgumentParserError(parser, '--help')
4833 parser.add_argument('-x', action='help')
4853 self.assertPrintHelpExit(parser, format % '--help')
4876 help='HELP',
4881 "choices=[1, 2, 3], help='HELP', metavar='METAVAR')")
4892 help='H HH H',
4897 "help='H HH H', metavar='MV MV MV')" % float)
5229 group.add_argument('--foo', action='store_true', help='FOO')
5230 group.add_argument('--spam', help='SPAM')
5231 parser.add_argument('badger', nargs='*', default='X', help='BADGER')
5241 group.add_argument('--foo', action='store_true', help='FOO')
5242 group.add_argument('--spam', help='SPAM')
5243 group.add_argument('badger', nargs='*', default='X', help='BADGER')
5506 -h, --help show this help message and exit