summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--patternutils/commands/pmatch.py4
-rw-r--r--patternutils/commands/targs.py8
-rw-r--r--patternutils/commands/tmv.py10
3 files changed, 9 insertions, 13 deletions
diff --git a/patternutils/commands/pmatch.py b/patternutils/commands/pmatch.py
index e5880d6..c276bf3 100644
--- a/patternutils/commands/pmatch.py
+++ b/patternutils/commands/pmatch.py
@@ -27,7 +27,9 @@ def walk(
def apply_regex(
- walk_function: Iterator[Any], regex_pattern: Pattern[str], match_full_path: bool,
+ walk_function: Iterator[Any],
+ regex_pattern: Pattern[str],
+ match_full_path: bool,
) -> Tuple[List[Dict[str, str]], bool]:
matches = []
diff --git a/patternutils/commands/targs.py b/patternutils/commands/targs.py
index 4c9e670..4ec9a17 100644
--- a/patternutils/commands/targs.py
+++ b/patternutils/commands/targs.py
@@ -11,13 +11,7 @@ import click
from .. import config, template, utils
-def run_command(
- data: Dict[str, str],
- render: Callable[..., str],
- run: Callable[..., None],
- shell: bool,
-) -> None:
- c = render(**data)
+def run_command(data: Dict[str, str], run: Callable[..., None], shell: bool,) -> None:
if not shell:
prepared_command = shlex.split(c) # type: Union[str, List[str]]
else:
diff --git a/patternutils/commands/tmv.py b/patternutils/commands/tmv.py
index 04321f1..e573c92 100644
--- a/patternutils/commands/tmv.py
+++ b/patternutils/commands/tmv.py
@@ -92,11 +92,11 @@ def tmv(
"""Rename files based on the OUTPUT_PATTERN.
- It read a JSON list containing objects or a stream of objects
- (if --stream option is defined). The object needs to have a
- key named as the option KEY (default: _abspath), which points
- to the file to move. The rest of the keys will be supplied to
- the templating engine to generate the new filename.
+ It read a JSON list containing objects or a stream of objects
+ (if --stream option is defined). The object needs to have a
+ key named as the option KEY (default: _abspath), which points
+ to the file to move. The rest of the keys will be supplied to
+ the templating engine to generate the new filename.
"""
try: