summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Fink2018-04-07 10:31:08 +0200
committerDennis Fink2018-04-07 10:31:08 +0200
commita925e57a485ba652d3125394ee66f8ec44845fc4 (patch)
treee0db6df15538b80849ef45ac4e4f4b23b45642f6
parent2683d479c8146cafaa5baa1baa3d3bf7df140151 (diff)
downloadpatternutils-a925e57a485ba652d3125394ee66f8ec44845fc4.tar.gz
patternutils-a925e57a485ba652d3125394ee66f8ec44845fc4.zip
Add vomments for mypy
-rw-r--r--patternutils/commands/pmatch.py2
-rw-r--r--patternutils/commands/targs.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/patternutils/commands/pmatch.py b/patternutils/commands/pmatch.py
index 5633c29..eac1bbe 100644
--- a/patternutils/commands/pmatch.py
+++ b/patternutils/commands/pmatch.py
@@ -84,7 +84,7 @@ def pmatch(
except re.error as e:
if verbose:
click.secho('Regular expression could not be compiled!', fg='red', err=True)
- click.secho(e.msg, fg='red', err=True)
+ click.secho(e.msg, fg='red', err=True) # type: ignore
raise SystemExit
# Monkey patch walk function to include commandline options
diff --git a/patternutils/commands/targs.py b/patternutils/commands/targs.py
index 3344e69..18528bb 100644
--- a/patternutils/commands/targs.py
+++ b/patternutils/commands/targs.py
@@ -27,7 +27,7 @@ def run_command(
) -> None:
c = render(**data)
if not shell:
- prepared_command = shlex.split(c)
+ prepared_command = shlex.split(c) # type: Union[str, List[str]]
else:
prepared_command = c
@@ -64,7 +64,7 @@ def targs(
) -> None:
try:
- data = json.load(read_from)
+ data = json.load(read_from) # type: ignore
except json.JSONDecodeError:
click.secho('JSON not valid!', fg='red', err=True)
raise SystemExit