summaryrefslogtreecommitdiff
path: root/patternutils/commands/targs.py
diff options
context:
space:
mode:
Diffstat (limited to 'patternutils/commands/targs.py')
-rw-r--r--patternutils/commands/targs.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/patternutils/commands/targs.py b/patternutils/commands/targs.py
index 6478377..bcd2e8e 100644
--- a/patternutils/commands/targs.py
+++ b/patternutils/commands/targs.py
@@ -11,11 +11,7 @@ import click
from .. import config, template, utils
-def run_command(
- command: str,
- run: Callable[..., None],
- shell: bool,
-) -> None:
+def run_command(data: Dict[str, str], run: Callable[..., None], shell: bool,) -> None:
run(shlex.split(command) if not shell else command)
@@ -117,15 +113,10 @@ def targs(
stdout = subprocess.DEVNULL if redirect_stdout else None
stderr = subprocess.DEVNULL if redirect_stderr else None
patched_subprocess = functools.partial(
- subprocess.run,
- shell=shell,
- stdout=stdout,
- stderr=stderr,
+ subprocess.run, shell=shell, stdout=stdout, stderr=stderr,
)
patched_run_command = functools.partial(
- run_command,
- run=patched_subprocess,
- shell=shell,
+ run_command, run=patched_subprocess, shell=shell,
)
max_procs = utils.max_procs() if max_procs == 0 else max_procs