@@ -371,15 +371,15 @@ def _field_value(self, field, check_file=False):
371
371
return value
372
372
373
373
def _command_shelltask_executable (self , field ):
374
- """Returining position and value for executable ShellTask input"""
374
+ """Returning position and value for executable ShellTask input"""
375
375
pos = 0 # executable should be the first el. of the command
376
376
value = self ._field_value (field )
377
377
if value is None :
378
378
raise ValueError ("executable has to be set" )
379
379
return pos , ensure_list (value , tuple2list = True )
380
380
381
381
def _command_shelltask_args (self , field ):
382
- """Returining position and value for args ShellTask input"""
382
+ """Returning position and value for args ShellTask input"""
383
383
pos = - 1 # assuming that args is the last el. of the command
384
384
value = self ._field_value (field , check_file = True )
385
385
if value is None :
@@ -396,7 +396,7 @@ def _command_pos_args(self, field):
396
396
argstr = field .metadata .get ("argstr" , None )
397
397
formatter = field .metadata .get ("formatter" , None )
398
398
if argstr is None and formatter is None :
399
- # assuming that input that has no arstr is not used in the command,
399
+ # assuming that input that has no argstr is not used in the command,
400
400
# or a formatter is not provided too.
401
401
return None
402
402
pos = field .metadata .get ("position" , None )
@@ -429,7 +429,7 @@ def _command_pos_args(self, field):
429
429
430
430
cmd_add = []
431
431
# formatter that creates a custom command argument
432
- # it can thake the value of the filed , all inputs, or the value of other fields.
432
+ # it can take the value of the field , all inputs, or the value of other fields.
433
433
if "formatter" in field .metadata :
434
434
call_args = inspect .getfullargspec (field .metadata ["formatter" ])
435
435
call_args_val = {}
@@ -453,7 +453,7 @@ def _command_pos_args(self, field):
453
453
cmd_add += split_cmd (cmd_el_str )
454
454
elif field .type is bool :
455
455
# if value is simply True the original argstr is used,
456
- # if False, nothing is added to the command
456
+ # if False, nothing is added to the command.
457
457
if value is True :
458
458
cmd_add .append (argstr )
459
459
else :
@@ -505,10 +505,10 @@ def cmdline(self):
505
505
command_args = self .container_args + self .command_args
506
506
else :
507
507
command_args = self .command_args
508
- # Skip the executable, which can be a multi-part command, e.g. 'docker run'.
508
+ # Skip the executable, which can be a multipart command, e.g. 'docker run'.
509
509
cmdline = command_args [0 ]
510
510
for arg in command_args [1 :]:
511
- # If there are spaces in the arg and it is not enclosed by matching
511
+ # If there are spaces in the arg, and it is not enclosed by matching
512
512
# quotes, add quotes to escape the space. Not sure if this should
513
513
# be expanded to include other special characters apart from spaces
514
514
if " " in arg :
@@ -600,7 +600,7 @@ def __init__(
600
600
def _field_value (self , field , check_file = False ):
601
601
"""
602
602
Checking value of the specific field, if value is not set, None is returned.
603
- If check_file is True, checking if field is a a local file
603
+ If check_file is True, checking if field is a local file
604
604
and settings bindings if needed.
605
605
"""
606
606
value = super ()._field_value (field )
@@ -855,7 +855,7 @@ def split_cmd(cmd: str):
855
855
str
856
856
the command line string split into process args
857
857
"""
858
- # Check whether running on posix or windows system
858
+ # Check whether running on posix or Windows system
859
859
on_posix = platform .system () != "Windows"
860
860
args = shlex .split (cmd , posix = on_posix )
861
861
cmd_args = []
0 commit comments