@@ -502,17 +502,31 @@ def core_bool_but_per_task_string(self):
502502 assert result [1 ].args .hide .value == "both"
503503
504504 def help_passed_when_task_expects_one_positional_arg (self ):
505- init = Context (args = [Argument (names = ("help" , "h" ), optional = True )])
506- task1 = Context ("mytask" , args = [Argument (names = ("name" , "n" ), kind = str , positional = True )])
505+ init = Context (args = [Argument (names = ("help" , "h" ), optional = True )]) # noqa
506+ task1 = Context ("mytask" ,
507+ args = [
508+ Argument (
509+ names = ("name" , "n" ),
510+ kind = str ,
511+ positional = True )
512+ ])
507513 parser = Parser (initial = init , contexts = [task1 ])
508514 result = parser .parse_argv (["mytask" , "--help" ])
509515 assert result [0 ].flags ['--help' ].value == "mytask"
510516
511517 def help_passed_when_task_expects_multiple_positional_arg (self ):
512- init = Context (args = [Argument (names = ("help" , "h" ), optional = True )])
513- task1 = Context ("mytask" , args = [Argument (names = ("pos_arg_one" , "o" ), kind = str , positional = True ),
514- Argument (names = ("pos_arg_two" , "t" ), kind = str , positional = True )
515- ])
518+ init = Context (args = [Argument (names = ("help" , "h" ), optional = True )]) # noqa
519+ task1 = Context ("mytask" ,
520+ args = [
521+ Argument (
522+ names = ("pos_arg_one" , "o" ),
523+ kind = str ,
524+ positional = True ),
525+ Argument (
526+ names = ("pos_arg_two" , "t" ),
527+ kind = str ,
528+ positional = True )
529+ ])
516530 parser = Parser (initial = init , contexts = [task1 ])
517531 result = parser .parse_argv (["mytask" , "--help" ])
518532 assert result [0 ].flags ['--help' ].value == "mytask"
0 commit comments