From b25ca8929c34f310ddbef63034308664f96e4dde Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Fri, 23 Apr 2021 10:36:47 +0300 Subject: [PATCH] Silence Semgrep warnings. --- template/__init__.py | 2 +- template/filters.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/template/__init__.py b/template/__init__.py index 84cccc7..8232865 100644 --- a/template/__init__.py +++ b/template/__init__.py @@ -18,7 +18,7 @@ import template.filters # I ignore import errors here and fail on them later in the main function so # the module can be imported by the setup.py with jinja missing so the # docstring can be used as the package description. -try: +try: # nosemgrep: rules.bandit.B110 from jinja2 import Environment except ImportError: pass diff --git a/template/filters.py b/template/filters.py index 93bd676..085cf6f 100644 --- a/template/filters.py +++ b/template/filters.py @@ -162,7 +162,7 @@ def run(*argv, **kwargs): if sys.version_info[0] < 3: # nosec import subprocess32 as subprocess else: - import subprocess + import subprocess # nosemgrep: rules.bandit.B40 defaults = {"stdout": subprocess.PIPE, "stderr": subprocess.PIPE} defaults.update(kwargs) -- GitLab