Skip to content

Commit a960578

Browse files
committed
MNT: Fix some typos in task module
1 parent a9a116d commit a960578

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pydra/engine/task.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -371,15 +371,15 @@ def _field_value(self, field, check_file=False):
371371
return value
372372

373373
def _command_shelltask_executable(self, field):
374-
"""Returining position and value for executable ShellTask input"""
374+
"""Returning position and value for executable ShellTask input"""
375375
pos = 0 # executable should be the first el. of the command
376376
value = self._field_value(field)
377377
if value is None:
378378
raise ValueError("executable has to be set")
379379
return pos, ensure_list(value, tuple2list=True)
380380

381381
def _command_shelltask_args(self, field):
382-
"""Returining position and value for args ShellTask input"""
382+
"""Returning position and value for args ShellTask input"""
383383
pos = -1 # assuming that args is the last el. of the command
384384
value = self._field_value(field, check_file=True)
385385
if value is None:
@@ -396,7 +396,7 @@ def _command_pos_args(self, field):
396396
argstr = field.metadata.get("argstr", None)
397397
formatter = field.metadata.get("formatter", None)
398398
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,
400400
# or a formatter is not provided too.
401401
return None
402402
pos = field.metadata.get("position", None)
@@ -429,7 +429,7 @@ def _command_pos_args(self, field):
429429

430430
cmd_add = []
431431
# 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.
433433
if "formatter" in field.metadata:
434434
call_args = inspect.getfullargspec(field.metadata["formatter"])
435435
call_args_val = {}
@@ -453,7 +453,7 @@ def _command_pos_args(self, field):
453453
cmd_add += split_cmd(cmd_el_str)
454454
elif field.type is bool:
455455
# 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.
457457
if value is True:
458458
cmd_add.append(argstr)
459459
else:
@@ -505,10 +505,10 @@ def cmdline(self):
505505
command_args = self.container_args + self.command_args
506506
else:
507507
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'.
509509
cmdline = command_args[0]
510510
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
512512
# quotes, add quotes to escape the space. Not sure if this should
513513
# be expanded to include other special characters apart from spaces
514514
if " " in arg:
@@ -600,7 +600,7 @@ def __init__(
600600
def _field_value(self, field, check_file=False):
601601
"""
602602
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
604604
and settings bindings if needed.
605605
"""
606606
value = super()._field_value(field)
@@ -855,7 +855,7 @@ def split_cmd(cmd: str):
855855
str
856856
the command line string split into process args
857857
"""
858-
# Check whether running on posix or windows system
858+
# Check whether running on posix or Windows system
859859
on_posix = platform.system() != "Windows"
860860
args = shlex.split(cmd, posix=on_posix)
861861
cmd_args = []

0 commit comments

Comments
 (0)