change: enable ruff/ty#19908
Merged
Merged
Conversation
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
unresolved-import |
1201 |
invalid-argument-type |
883 |
unresolved-attribute |
849 |
invalid-assignment |
438 |
unsupported-operator |
118 |
invalid-parameter-default |
118 |
not-subscriptable |
81 |
invalid-method-override |
55 |
invalid-return-type |
34 |
no-matching-overload |
31 |
call-non-callable |
27 |
unresolved-reference |
20 |
invalid-type-form |
13 |
unused-type-ignore-comment |
4 |
possibly-missing-submodule |
3 |
| +6 more rules |
First entries
tests/tools/test_mcp_tool_401_handling.py:13: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
tests/gateway/test_weak_credential_guard.py:10: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
tests/hermes_cli/test_kanban_core_functionality.py:1183: [invalid-assignment] invalid-assignment: Object of type `(pid) -> Literal[False]` is not assignable to attribute `_pid_alive` of type `def _pid_alive(pid: int | None) -> bool`
tools/mcp_oauth_manager.py:181: [unresolved-import] unresolved-import: Cannot resolve imported module `mcp.client.auth.utils`
tests/tools/test_vercel_sandbox_environment.py:206: [unresolved-attribute] unresolved-attribute: Unresolved attribute `SandboxStatus` on type `ModuleType`
batch_runner.py:36: [unresolved-import] unresolved-import: Cannot resolve imported module `fire`
gateway/platforms/dingtalk.py:956: [unresolved-attribute] unresolved-attribute: Attribute `DeliverCardRequestImGroupOpenDeliverModel` is not defined on `None` in union `Unknown | None`
tests/hermes_cli/test_ignore_user_config_flags.py:23: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
tests/gateway/test_unknown_command.py:322: [unresolved-attribute] unresolved-attribute: Attribute `args` is not defined on `None` in union `_Call | None`
plugins/memory/hindsight/__init__.py:1216: [unresolved-import] unresolved-import: Cannot resolve imported module `hindsight_embed.daemon_embed_manager`
cli.py:9582: [unsupported-operator] unsupported-operator: Operator `+` is not supported between objects of type `Literal["[Voice input — respond concisely and conversationally, 2-3 sentences max. No code blocks or markdown.] "]` and `(Unknown & ~str) | list[dict[str, Any]] | str`
tests/gateway/test_auth_fallback.py:6: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
tests/gateway/test_telegram_network.py:18: [unresolved-import] unresolved-import: Cannot resolve imported module `httpx`
tests/agent/test_models_dev.py:111: [invalid-argument-type] invalid-argument-type: Argument to function `_extract_context` is incorrect: Expected `dict[str, Any]`, found `Literal["not a dict"]`
hermes_cli/banner.py:21: [unresolved-import] unresolved-import: Cannot resolve imported module `prompt_toolkit`
tests/tools/test_kanban_tools.py:646: [unresolved-attribute] unresolved-attribute: Attribute `id` is not defined on `None` in union `Run | None`
tests/run_agent/test_anthropic_error_handling.py:470: [invalid-assignment] invalid-assignment: Object of type `(messages, history=None) -> None` is not assignable to attribute `_persist_session` of type `def _persist_session(self, messages: list[dict[Unknown, Unknown]], conversation_history: list[dict[Unknown, Unknown]] = None) -> Unknown`
hermes_state.py:511: [unresolved-attribute] unresolved-attribute: Attribute `commit` is not defined on `None` in union `Connection | None`
cli.py:12221: [invalid-parameter-default] invalid-parameter-default: Default value of type `None` is not assignable to annotated parameter type `str | list[str] | tuple[str, ...]`
tests/acp/test_events.py:10: [unresolved-import] unresolved-import: Cannot resolve imported module `acp.schema`
tests/gateway/test_webhook_deliver_only.py:24: [unresolved-import] unresolved-import: Cannot resolve imported module `aiohttp.test_utils`
tests/gateway/test_weixin.py:391: [invalid-assignment] invalid-assignment: Object of type `AsyncMock` is not assignable to attribute `_send_file` of type `def _send_file(self, chat_id: str, path: str, caption: str, force_file_attachment: bool = False) -> CoroutineType[Any, Any, str]`
gateway/mirror.py:172: [invalid-argument-type] invalid-argument-type: Argument to bound method `SessionDB.append_message` is incorrect: Expected `str`, found `Unknown | None`
tests/tools/test_ssh_bulk_upload.py:8: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
tests/gateway/test_teams.py:82: [unresolved-attribute] unresolved-attribute: Unresolved attribute `ClientOptions` on type `ModuleType`
... and 3859 more
✅ Fixed issues: none
Unchanged: 0 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
JinyuID
pushed a commit
to JinyuID/hermes-agent
that referenced
this pull request
May 11, 2026
change: enable ruff/ty
jsboige
pushed a commit
to jsboige/hermes-agent
that referenced
this pull request
May 14, 2026
change: enable ruff/ty
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
change: enable ruff/ty
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
change: enable ruff/ty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Enable typechecking via
ty.This catches tons of real issues with the codebase.
This doesn't fix any issues ATM, nor does it cause any new CI failures. This is informative-only at the moment.
Related Issue
HACORE-1
Type of Change
Changes Made
ruff/ty.How to Test