summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--patternutils/commands/pmatch.py4
-rw-r--r--patternutils/commands/targs.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/patternutils/commands/pmatch.py b/patternutils/commands/pmatch.py
index 21f5557..da32f9c 100644
--- a/patternutils/commands/pmatch.py
+++ b/patternutils/commands/pmatch.py
@@ -9,7 +9,7 @@ from typing import Generator, List, Iterator, Pattern, Any, Tuple, Dict, Match
import click
-import patternutils
+from .. import match as mat
def walk(dir: str, recursive: bool=False, match_directories: bool=False) -> Generator[os.DirEntry, None, None]:
@@ -33,7 +33,7 @@ def apply_regex(
for f in walk_function:
subject = f.path if match_full_path else f.name
try:
- match = patternutils.match.apply(subject, regex_pattern)
+ match = mat.apply(subject, regex_pattern)
except ValueError:
click.secho('{} did not match'.format(subject), fg='red', err=True)
has_invalid_matches = True
diff --git a/patternutils/commands/targs.py b/patternutils/commands/targs.py
index ad7e047..14ecce7 100644
--- a/patternutils/commands/targs.py
+++ b/patternutils/commands/targs.py
@@ -14,7 +14,7 @@ from typing import (
import click
-import patternutils
+from .. import template
def run_command(
@@ -66,7 +66,7 @@ def targs(
use_jinja = True if template_engine == 'jinja2' else False
try:
- render = patternutils.template.get_render_function(command, use_jinja=use_jinja)
+ render = template.get_render_function(command, use_jinja=use_jinja)
except RuntimeError:
click.secho('jinja2 not installed!', fg='red', err=True)
raise SystemExit