From a46f71bb703dd8ada77e5eaf2a0b05d741d39bbf Mon Sep 17 00:00:00 2001 From: josibake Date: Tue, 24 Aug 2021 18:05:43 +0200 Subject: lint: enable mypy checking for missing imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Achieve this by adding some ignore, and making data/ importable. Co-authored-by: João Barbosa --- test/functional/combine_logs.py | 2 +- test/functional/data/__init__.py | 0 test/functional/test_runner.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 test/functional/data/__init__.py (limited to 'test/functional') diff --git a/test/functional/combine_logs.py b/test/functional/combine_logs.py index 00f2833f55..71dfb4c01a 100755 --- a/test/functional/combine_logs.py +++ b/test/functional/combine_logs.py @@ -188,7 +188,7 @@ def print_logs_plain(log_events, colors): def print_logs_html(log_events): """Renders the iterator of log events into html.""" try: - import jinja2 + import jinja2 #type:ignore except ImportError: print("jinja2 not found. Try `pip install jinja2`") sys.exit(1) diff --git a/test/functional/data/__init__.py b/test/functional/data/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index c5f08b27f2..d6f61bfbff 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -40,7 +40,7 @@ except UnicodeDecodeError: CROSS = "x " CIRCLE = "o " -if os.name != 'nt' or sys.getwindowsversion() >= (10, 0, 14393): +if os.name != 'nt' or sys.getwindowsversion() >= (10, 0, 14393): #type:ignore if os.name == 'nt': import ctypes kernel32 = ctypes.windll.kernel32 # type: ignore -- cgit v1.2.3