• Home
  • Raw
  • Download

Lines Matching full:help

442 …= ['--bar', '-fbar', '-b B', 'B', '-f', '--bar B', '-baz', '-h', '--help', '+h', '::help', '/help']
454 """When ``-`` not in prefix_chars, default operators created for help
1757 prefix_chars[0] * 2 + 'foo', action='store_true', help='foo help')
1762 '--foo', action='store_true', help='foo help')
1764 'bar', type=float, help='bar help')
1767 subparsers = parser.add_subparsers(help='command help')
1773 parser1_kwargs['help'] = '1 help'
1775 parser1.add_argument('-w', type=int, help='w help')
1776 parser1.add_argument('x', choices='abc', help='x help')
1781 parser2_kwargs['help'] = '2 help'
1783 parser2.add_argument('-y', choices='123', help='y help')
1784 parser2.add_argument('z', type=complex, nargs='*', help='z help')
1789 parser3_kwargs['help'] = '3 help'
1791 parser3.add_argument('t', type=int, help='t help')
1792 parser3.add_argument('u', nargs='...', help='u help')
1868 bar bar help
1869 {1,2,3} command help
1872 -h, --help show this help message and exit
1873 --foo foo help
1877 # Make sure - is still used for help if it is a non-first prefix char
1887 bar bar help
1888 {1,2,3} command help
1891 -h, --help show this help message and exit
1892 ++foo foo help
1906 bar bar help
1907 {1,2,3} command help
1910 +h, ++help show this help message and exit
1911 ++foo foo help
1924 bar bar help
1925 {1,2,3} command help
1926 1 1 help
1927 2 2 help
1928 3 3 help
1931 -h, --help show this help message and exit
1932 --foo foo help
1938 parser.add_argument('--foo', action='store_true', help='foo help')
1939 parser.add_argument('bar', help='bar help')
1941 description='command help',
1942 help='additional text')
1953 bar bar help
1956 -h, --help show this help message and exit
1957 --foo foo help
1960 command help
1982 {a,b,c} x help
1985 -h, --help show this help message and exit
1986 -w W w help
1996 z z help
1999 -h, --help show this help message and exit
2000 -y {1,2,3} y help
2180 -h, --help show this help message and exit
2210 -h, --help show this help message and exit
2255 -h, --help show this help message and exit
2302 help = self.usage_when_not_required + self.help
2303 self.assertEqual(format_help(), textwrap.dedent(help))
2307 help = self.usage_when_required + self.help
2308 self.assertEqual(format_help(), textwrap.dedent(help))
2316 group.add_argument('--bar', help='bar help')
2317 group.add_argument('--baz', nargs='?', const='Z', help='baz help')
2337 help = '''\ variable in TestMutuallyExclusiveSimple
2340 -h, --help show this help message and exit
2341 --bar BAR bar help
2342 --baz [BAZ] baz help
2350 parser.add_argument('--abcde', help='abcde help')
2351 parser.add_argument('--fghij', help='fghij help')
2353 group.add_argument('--klmno', help='klmno help')
2354 group.add_argument('--pqrst', help='pqrst help')
2378 help = '''\ variable in TestMutuallyExclusiveLong
2381 -h, --help show this help message and exit
2382 --abcde ABCDE abcde help
2383 --fghij FGHIJ fghij help
2384 --klmno KLMNO klmno help
2385 --pqrst PQRST pqrst help
2394 group.add_argument('-x', help=argparse.SUPPRESS)
2395 group.add_argument('-y', action='store_false', help='y help')
2414 help = '''\ variable in TestMutuallyExclusiveFirstSuppressed
2417 -h, --help show this help message and exit
2418 -y y help
2428 add('--spam', action='store_true', help=argparse.SUPPRESS)
2429 add('--badger', action='store_false', help=argparse.SUPPRESS)
2430 add('--bladder', help=argparse.SUPPRESS)
2451 help = '''\ variable in TestMutuallyExclusiveManySuppressed
2454 -h, --help show this help message and exit
2463 group.add_argument('--foo', action='store_true', help='FOO')
2464 group.add_argument('--spam', help='SPAM')
2465 group.add_argument('badger', nargs='*', default='X', help='BADGER')
2491 help = '''\ variable in TestMutuallyExclusiveOptionalAndPositional
2497 -h, --help show this help message and exit
2507 parser.add_argument('-x', action='store_true', help='x help')
2509 group.add_argument('-a', action='store_true', help='a help')
2510 group.add_argument('-b', action='store_true', help='b help')
2511 parser.add_argument('-y', action='store_true', help='y help')
2512 group.add_argument('-c', action='store_true', help='c help')
2533 help = '''\ variable in TestMutuallyExclusiveOptionalsMixed
2536 -h, --help show this help message and exit
2537 -x x help
2538 -a a help
2539 -b b help
2540 -y y help
2541 -c c help
2553 mutex_group.add_argument('--bar', help='bar help')
2554 mutex_group.add_argument('--baz', help='baz help')
2572 help = '''\ variable in TestMutuallyExclusiveInGroup
2575 -h, --help show this help message and exit
2580 --bar BAR bar help
2581 --baz BAZ baz help
2589 parser.add_argument('x', help='x help')
2590 parser.add_argument('-y', action='store_true', help='y help')
2592 group.add_argument('a', nargs='?', help='a help')
2593 group.add_argument('-b', action='store_true', help='b help')
2594 group.add_argument('-c', action='store_true', help='c help')
2613 help = '''\ variable in TestMutuallyExclusiveOptionalsAndPositionalsMixed
2616 x x help
2617 a a help
2620 -h, --help show this help message and exit
2621 -y y help
2622 -b b help
2623 -c c help
2817 # Help formatting tests
2904 # add tests for {format,print}_{usage,help,version}
2906 ('help', 'stdout'),
2915 """Make sure that argument help aligns when options are longer"""
2920 Sig('-x', action='store_true', help='X HELP'),
2921 Sig('--y', help='Y HELP'),
2922 Sig('foo', help='FOO HELP'),
2923 Sig('bar', help='BAR HELP'),
2929 help = usage + '''\ variable in TestHelpBiggerOptionals
2934 foo FOO HELP
2935 bar BAR HELP
2938 -h, --help show this help message and exit
2940 -x X HELP
2941 --y Y Y HELP
2972 help = usage + '''\ variable in TestShortColumns
2978 FOO HELP
2980 BAR HELP
2983 -h, --help
2985 help
2995 X HELP
2997 Y HELP
3005 """Make sure that argument help aligns when options are longer"""
3010 Sig('-x', action='store_true', help='X HELP'),
3011 Sig('--y', help='Y HELP'),
3012 Sig('foo', help='FOO HELP'),
3013 Sig('bar', help='BAR HELP'),
3017 Sig('baz', help='BAZ HELP'),
3018 Sig('-z', nargs='+', help='Z HELP')]),
3023 help = usage + '''\ variable in TestHelpBiggerOptionalGroups
3028 foo FOO HELP
3029 bar BAR HELP
3032 -h, --help show this help message and exit
3034 -x X HELP
3035 --y Y Y HELP
3040 baz BAZ HELP
3041 -z Z [Z ...] Z HELP
3051 """Make sure that help aligns when arguments are longer"""
3055 Sig('-x', action='store_true', help='X HELP'),
3056 Sig('--y', help='Y HELP'),
3057 Sig('ekiekiekifekang', help='EKI HELP'),
3058 Sig('bar', help='BAR HELP'),
3064 help = usage + '''\ variable in TestHelpBiggerPositionals
3069 ekiekiekifekang EKI HELP
3070 bar BAR HELP
3073 -h, --help show this help message and exit
3074 -x X HELP
3075 --y Y Y HELP
3092 Sig('-x', metavar='XX', help='oddly\n'
3093 ' formatted -x help'),
3094 Sig('y', metavar='yyy', help='normal y help'),
3102 help=' oddly \n'
3103 'formatted -a help \n'
3110 help = usage + '''\ variable in TestHelpReformatting
3117 yyy normal y help
3120 -h, --help show this help message and exit
3121 -x XX oddly formatted -x help
3126 -a oddly formatted -a help again, so long that it should \
3138 Sig('-x', metavar='XX', help='XHH HX' * 20),
3139 Sig('y', metavar='yyy', help='YH YH' * 20),
3143 Sig('-a', action='store_true', help='AHHH HHA' * 10)]),
3148 help = usage + '''\ variable in TestHelpWrappingShortNames
3160 -h, --help show this help message and exit
3179 Sig('-x', metavar='X' * 25, help='XH XH' * 20),
3180 Sig('y', metavar='y' * 25, help='YH YH' * 20),
3184 Sig('-a', metavar='A' * 25, help='AH AH' * 20),
3185 Sig('z', metavar='z' * 25, help='ZH ZH' * 20)]),
3190 help = usage + '''\ variable in TestHelpWrappingLongNames
3203 -h, --help show this help message and exit
3232 Sig('-w', nargs='+', help='w'),
3233 Sig('-x', nargs='*', help='x'),
3234 Sig('a', help='a'),
3235 Sig('b', help='b', nargs=2),
3236 Sig('c', help='c', nargs='?'),
3240 Sig('-y', nargs='?', help='y'),
3241 Sig('-z', nargs=3, help='z'),
3242 Sig('d', help='d', nargs='*'),
3243 Sig('e', help='e', nargs='+'),
3250 help = usage + '''\ variable in TestHelpUsage
3258 -h, --help show this help message and exit
3278 Sig('-x', help='x'),
3279 Sig('a', help='a'),
3282 Sig('b', help='b'),
3283 Sig('-y', help='y'),
3289 help = usage + '''\ variable in TestHelpOnlyUserGroups
3317 help = usage + '''\ variable in TestHelpUsageLongProg
3324 -h, --help show this help message and exit
3351 help = usage + '''\ variable in TestHelpUsageLongProgOptionsWrap
3358 -h, --help show this help message and exit
3382 help = usage + '''\ variable in TestHelpUsageLongProgPositionalsWrap
3413 help = usage + '''\ variable in TestHelpUsageOptionalsWrap
3421 -h, --help show this help message and exit
3448 help = usage + '''\ variable in TestHelpUsagePositionalsWrap
3456 -h, --help show this help message and exit
3484 help = usage + '''\ variable in TestHelpUsageOptionalsPositionalsWrap
3492 -h, --help show this help message and exit
3515 help = usage + '''\ variable in TestHelpUsageOptionalsOnlyWrap
3518 -h, --help show this help message and exit
3540 help = usage + '''\ variable in TestHelpUsagePositionalsOnlyWrap
3551 """Test that variables are expanded properly in help messages"""
3556 help='x %(prog)s %(default)s %(type)s %%'),
3558 help='y %(prog)s %(default)s %(const)s'),
3560 help='foo %(prog)s %(default)s %(choices)s'),
3562 help='bar %(prog)s %(default)s %(dest)s'),
3563 Sig('spam', help='spam %(prog)s %(default)s'),
3564 Sig('badger', default=0.5, help='badger %(prog)s %(default)s'),
3568 Sig('-a', help='a %(prog)s %(default)s'),
3569 Sig('-b', default=-1, help='b %(prog)s %(default)s'),
3576 help = usage + '''\ variable in TestHelpVariableExpansion
3583 -h, --help show this help message and exit
3605 help = usage + '''\ variable in TestHelpVariableExpansionUsageSupplied
3608 -h, --help show this help message and exit
3622 help = usage variable in TestHelpVariableExpansionNoArguments
3631 Sig('--foo', help='foo help'),
3632 Sig('spam', help='spam help'),
3635 help = '''\ variable in TestHelpSuppressUsage
3637 spam spam help
3640 -h, --help show this help message and exit
3641 --foo FOO foo help
3648 """Test that optional arguments can be suppressed in help messages"""
3652 Sig('--foo', help=argparse.SUPPRESS),
3653 Sig('spam', help='spam help'),
3659 help = usage + '''\ variable in TestHelpSuppressOptional
3662 spam spam help
3668 """Test that optional groups can be suppressed in help messages"""
3672 Sig('--foo', help='foo help'),
3673 Sig('spam', help='spam help'),
3676 (Sig('group'), [Sig('--bar', help=argparse.SUPPRESS)]),
3681 help = usage + '''\ variable in TestHelpSuppressOptionalGroup
3684 spam spam help
3687 -h, --help show this help message and exit
3688 --foo FOO foo help
3694 """Test that positional arguments can be suppressed in help messages"""
3698 Sig('--foo', help='foo help'),
3699 Sig('spam', help=argparse.SUPPRESS),
3705 help = usage + '''\ variable in TestHelpSuppressPositional
3708 -h, --help show this help message and exit
3709 --foo FOO foo help
3719 Sig('--foo', required=True, help='foo help'),
3725 help = usage + '''\ variable in TestHelpRequiredOptional
3728 -h, --help show this help message and exit
3729 --foo FOO foo help
3739 Sig('^^foo', action='store_true', help='foo help'),
3740 Sig(';b', ';;bar', help='bar help'),
3746 help = usage + '''\ variable in TestHelpAlternatePrefixChars
3749 ^^foo foo help
3750 ;b BAR, ;;bar BAR bar help
3756 """Test that the --help argument can be suppressed help messages"""
3760 Sig('--foo', help='foo help'),
3761 Sig('spam', help='spam help'),
3767 help = usage + '''\ variable in TestHelpNoHelpOptional
3770 spam spam help
3773 --foo FOO foo help
3779 """Test that the --version argument can be suppressed help messages"""
3783 Sig('--foo', help='foo help'),
3784 Sig('spam', help='spam help'),
3790 help = usage + '''\ variable in TestHelpVersionOptional
3793 spam spam help
3796 -h, --help show this help message and exit
3798 --foo FOO foo help
3806 """Test that no errors occur if no help is specified"""
3817 help = usage + '''\ variable in TestHelpNone
3823 -h, --help show this help message and exit
3834 Sig('-w', help='w', nargs='+', metavar=('W1', 'W2')),
3835 Sig('-x', help='x', nargs='*', metavar=('X1', 'X2')),
3836 Sig('-y', help='y', nargs=3, metavar=('Y1', 'Y2', 'Y3')),
3837 Sig('-z', help='z', nargs='?', metavar=('Z1', )),
3844 help = usage + '''\ variable in TestHelpTupleMetavar
3847 -h, --help show this help message and exit
3867 Sig('--foo', help=' foo help should also\n'
3869 Sig('spam', help='spam help'),
3875 [Sig('--bar', help='bar help')]),
3880 help = usage + '''\ variable in TestHelpRawText
3888 spam spam help
3891 -h, --help show this help message and exit
3892 --foo FOO foo help should also
3900 --bar BAR bar help
3916 Sig('--foo', help=' foo help should not\n'
3918 Sig('spam', help='spam help'),
3924 [Sig('--bar', help='bar help')]),
3929 help = usage + '''\ variable in TestHelpRawDescription
3937 spam spam help
3940 -h, --help show this help message and exit
3941 --foo FOO foo help should not retain this odd formatting
3948 --bar BAR bar help
3961 Sig('--foo', help='foo help - oh and by the way, %(default)s'),
3962 Sig('--bar', action='store_true', help='bar help'),
3963 Sig('spam', help='spam help'),
3964 Sig('badger', nargs='?', default='wooden', help='badger help'),
3968 [Sig('--baz', type=int, default=42, help='baz help')]),
3973 help = usage + '''\ variable in TestHelpArgumentDefaults
3978 spam spam help
3979 badger badger help (default: wooden)
3982 -h, --help show this help message and exit
3983 --foo FOO foo help - oh and by the way, None
3984 --bar bar help (default: False)
3989 --baz BAZ baz help (default: 42)
3994 """Test the default help for the version action"""
4002 help = usage + '''\ variable in TestHelpVersionAction
4007 -h, --help show this help message and exit
4013 """Test ordering of subcommands in help matches the code"""
4025 help = usage + '''\ variable in TestHelpSubparsersOrdering
4033 -h, --help show this help message and exit
4042 """Test ordering of subcommands in help matches the code"""
4047 subcommand_data = (('a', 'a subcommand help'),
4048 ('b', 'b subcommand help'),
4049 ('c', 'c subcommand help'),
4050 ('d', 'd subcommand help'),
4051 ('e', 'e subcommand help'),
4054 subparsers_signatures = [Sig(name=name, help=help)
4055 for name, help in subcommand_data]
4061 help = usage + '''\ variable in TestHelpSubparsersWithHelpOrdering
4067 a a subcommand help
4068 b b subcommand help
4069 c c subcommand help
4070 d d subcommand help
4071 e e subcommand help
4074 -h, --help show this help message and exit
4235 help='FOO', metavar='BAR', dest='baz')
4241 self.assertEqual(action.help, 'FOO')
4269 parser.add_argument('-x', help='OLD X')
4270 parser.add_argument('-x', help='NEW X')
4275 -h, --help show this help message and exit
4285 -h, --help show this help message and exit
4292 # Help and Version option tests
4296 """Test the help and version actions"""
4322 self.assertPrintHelpExit(parser, '--help')
4334 self.assertArgumentParserError(parser, '--help')
4347 self.assertArgumentParserError(parser, '--help')
4353 parser.add_argument('-x', action='help')
4372 self.assertPrintHelpExit(parser, format % '--help')
4396 help='HELP',
4401 "choices=[1, 2, 3], help='HELP', metavar='METAVAR')")
4412 help='H HH H',
4417 "help='H HH H', metavar='MV MV MV')" % float)
4837 -h, --help show this help message and exit