Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ repos:
- "types-docutils"
- "types-lxml"

- repo: https://github.com/astral-sh/ty-pre-commit
rev: v0.0.59
hooks:
- id: ty

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.37.3"
hooks:
Expand Down
33 changes: 33 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,39 @@ reportPrivateUsage = false
reportUnknownMemberType = false
reportUnnecessaryCast = false # Unnecessary "cast" call; type is already...

[tool.ty]
environment.root = ["./tmt"]

[tool.ty.rules]
# TODO: ty is very much in its Beta stage, not ready for production.
# Disabling all rules that fail, for the sake of experiment, and will
# enable them one by one when the tool becomes ready.
unresolved-attribute = "ignore"
unknown-argument = "ignore"
unresolved-reference = "ignore"
invalid-argument-type = "ignore"
invalid-return-type = "ignore"
no-matching-overload = "ignore"
invalid-type-form = "ignore"
not-subscriptable = "ignore"
unsupported-operator = "ignore"
possibly-missing-attribute = "ignore"
invalid-assignment = "ignore"
unresolved-import = "ignore"
invalid-method-override = "ignore"
unsupported-base = "ignore"
invalid-key = "ignore"
redundant-cast = "ignore"
deprecated = "ignore"
missing-argument = "ignore"
too-many-positional-arguments = "ignore"
invalid-yield = "ignore"
possibly-missing-submodule = "ignore"
invalid-generic-class = "ignore"
call-top-callable = "ignore"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Correct the typo call-top-callable to call-non-callable.

Suggested change
call-top-callable = "ignore"
call-non-callable = "ignore"

inconsistent-mro = "ignore"
invalid-legacy-type-variable = "ignore"

[tool.ruff]
line-length = 99
src = ["tmt", "tests"]
Expand Down
2 changes: 1 addition & 1 deletion tmt/guest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2462,7 +2462,7 @@ def execute(
on_process_end: Optional[OnProcessEndCallback] = None,
sourced_files: Optional[list[Path]] = None,
**kwargs: Any,
) -> tmt.utils.CommandOutput:
) -> Optional[tmt.utils.CommandOutput]:
"""
Execute a command on the guest.

Expand Down
Loading