From c13e290aee5617fad6db9c4a89ecb1bbc3317133 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Fri, 27 Aug 2021 10:54:49 +0300 Subject: [PATCH] [INFRA] New attempt to silence LGTM false positive Previous commit bb6065a from #853 does not work around the LGTM alert. We attempt to silence the LGTM alert using an lgtm.yml file, and use standard Flake8 noqa suppression comments to document the issue at hand. --- lgtm.yml | 3 +++ pdf_build_src/process_markdowns.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 lgtm.yml diff --git a/lgtm.yml b/lgtm.yml new file mode 100644 index 0000000000..cbdd9e90c1 --- /dev/null +++ b/lgtm.yml @@ -0,0 +1,3 @@ +# https://github.com/github/codeql/issues/6517 +queries: + - exclude: py/unused-import diff --git a/pdf_build_src/process_markdowns.py b/pdf_build_src/process_markdowns.py index 53d9481d29..a1e5bfd38e 100644 --- a/pdf_build_src/process_markdowns.py +++ b/pdf_build_src/process_markdowns.py @@ -16,7 +16,8 @@ import numpy as np sys.path.append("../tools/") -from mkdocs_macros_bids import macros # noqa (used in "eval" call later on) +# functions from module macros are called by eval() later on +from mkdocs_macros_bids import macros # noqa: F401 def run_shell_cmd(command):