From 14520919bdd27c8737f09f548b778fcfbf1090fc Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Fri, 27 Nov 2020 21:27:55 +0200 Subject: [PATCH] Pylint warnings. Ignore a few warnings, change the order of imports. Nothing material. --- template/__init__.py | 2 +- template/filters.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/template/__init__.py b/template/__init__.py index 4472d91..83bea66 100644 --- a/template/__init__.py +++ b/template/__init__.py @@ -12,8 +12,8 @@ from os import environ from sys import stdin, stdout import argparse from argparse import ArgumentParser -import template.filters from jinja2 import Environment +import template.filters __version__ = "0.5.1" diff --git a/template/filters.py b/template/filters.py index c521885..c18addc 100644 --- a/template/filters.py +++ b/template/filters.py @@ -1,6 +1,6 @@ #!/usr/bin/env python """Filters for the template CLI.""" -# pylint: disable=import-error +# pylint: disable=import-error, import-outside-toplevel from __future__ import ( @@ -166,7 +166,9 @@ def run(*argv, **kwargs): defaults = {"stdout": subprocess.PIPE, "stderr": subprocess.PIPE} defaults.update(kwargs) - proc = subprocess.run(*argv, **defaults).__dict__ # nosec + proc = subprocess.run( # nosec, pylint: disable=subprocess-run-check + *argv, **defaults + ).__dict__ if "text" not in kwargs or kwargs["text"]: proc["stdout"] = proc["stdout"].decode() proc["stderr"] = proc["stderr"].decode() -- GitLab