From a925e57a485ba652d3125394ee66f8ec44845fc4 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sat, 7 Apr 2018 10:31:08 +0200 Subject: Add vomments for mypy --- patternutils/commands/pmatch.py | 2 +- patternutils/commands/targs.py | 4 ++-- 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 -- cgit v1.3.1