mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-29 06:31:32 +00:00
chore(ty): suppress unresolved-import inside tests/ to keep lint-diff PR comment useful
The lint-diff CI job runs ty as a bare uv tool without installing the project's venv, so test files trip ty with unresolved-import on pytest itself and on local test-only deps. The PR #30136 github- actions lint-summary bot reported 7 new such warnings, even though ty itself flags them as non-blocking and the imports demonstrably work at runtime (the full pytest suite in a sibling CI job exercises them). Installing the full venv just to please ty would balloon the lint job runtime; the override below tells ty to ignore unresolved-import strictly inside tests/. The diagnostic class continues to be active for hermes_cli/, agent/, plugins/, etc. — anywhere those imports might really break.
This commit is contained in:
parent
02c933aedc
commit
1150639fa9
1 changed files with 15 additions and 0 deletions
|
|
@ -246,6 +246,21 @@ python-version = "3.13"
|
|||
unknown-argument = "warn"
|
||||
redundant-cast = "ignore"
|
||||
|
||||
# Per-file rule overrides — see [tool.ty.overrides] below.
|
||||
#
|
||||
# Tests can't resolve their own third-party dev deps (pytest, etc.)
|
||||
# under the lint-diff CI job because that job installs ``ty`` as a
|
||||
# bare uv tool without the project's venv. Installing the full venv
|
||||
# just to please the type checker would balloon the lint job; the
|
||||
# diagnostics aren't actionable inside tests anyway because the
|
||||
# imports demonstrably work at runtime (the same CI runs the full
|
||||
# pytest suite in a different job). Suppress unresolved-import
|
||||
# inside tests/ so the lint-diff PR comment stays useful.
|
||||
|
||||
[[tool.ty.overrides]]
|
||||
include = ["tests/**"]
|
||||
rules = { unresolved-import = "ignore" }
|
||||
|
||||
[tool.ruff]
|
||||
preview = true # required for PLW1514 (unspecified-encoding) — preview rule
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue