From a7c67acee6a8cc59a7a362cc12d4ee3e41a01f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Prchl=C3=ADk?= Date: Thu, 18 Apr 2024 15:39:24 +0200 Subject: [PATCH] squash: tackle some issues --- pyproject.toml | 1 + tests/type-annotations/test.sh | 2 +- tmt/cli.py | 3 ++- tmt/steps/report/html.py | 8 ++++++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 81117e94e1..3eb228d871 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -217,6 +217,7 @@ module = [ "pylero.*", "testcloud.*", "mrack.*", + "pint.*", ] ignore_missing_imports = true diff --git a/tests/type-annotations/test.sh b/tests/type-annotations/test.sh index a351c23564..da9fbba504 100755 --- a/tests/type-annotations/test.sh +++ b/tests/type-annotations/test.sh @@ -39,7 +39,7 @@ rlJournalStart rlRun "$TEST_VENV/bin/python3 -m pyright" popd - rlRun "rm -rf $TEST_VENV" + # rlRun "rm -rf $TEST_VENV" rlPhaseEnd else rlPhaseStartTest "Check type annotations against development packages" diff --git a/tmt/cli.py b/tmt/cli.py index 1afd4bbfaf..0ca5122872 100644 --- a/tmt/cli.py +++ b/tmt/cli.py @@ -143,7 +143,8 @@ def pass_context(fn: 'Callable[Concatenate[Context, P], R]') -> 'Callable[P, R]' ``type: ignore[arg-type]``. """ - return click.pass_context(fn) # type: ignore[arg-type] + # TODO: explain waivers before merging! + return click.pass_context(fn) # type: ignore[arg-type,return-value,unused-ignore] @dataclasses.dataclass diff --git a/tmt/steps/report/html.py b/tmt/steps/report/html.py index dcb138c86d..7d2bdc6f19 100644 --- a/tmt/steps/report/html.py +++ b/tmt/steps/report/html.py @@ -70,7 +70,9 @@ def go(self) -> None: def _linkable_path(path: str) -> str: return str(Path(path).absolute()) - environment.filters["linkable_path"] = _linkable_path + # TODO: explain waivers before merging! + environment.filters["linkable_path"] \ + = _linkable_path # type: ignore[reportArgumentType,unused-ignore] else: # Links used in html should be relative to a workdir def _linkable_path(path: str) -> str: @@ -78,7 +80,9 @@ def _linkable_path(path: str) -> str: return str(Path(path).relative_to(self.workdir)) - environment.filters["linkable_path"] = _linkable_path + # TODO: explain waivers before merging! + environment.filters["linkable_path"] \ + = _linkable_path # type: ignore[reportArgumentType,unused-ignore] if self.data.display_guest == 'always': display_guest = True