Skip to content

Commit

Permalink
squash: tackle some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
happz committed Apr 18, 2024
1 parent 4278abb commit a7c67ac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ module = [
"pylero.*",
"testcloud.*",
"mrack.*",
"pint.*",
]
ignore_missing_imports = true

Expand Down
2 changes: 1 addition & 1 deletion tests/type-annotations/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion tmt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions tmt/steps/report/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,19 @@ 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:
assert self.workdir is not None # narrow type

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
Expand Down

0 comments on commit a7c67ac

Please sign in to comment.