fix(quality): close type and lint ratchets

This commit is contained in:
jxxghp
2026-08-26 21:55:01 +08:00
parent 1f7fac2b28
commit 6062b06610
10 changed files with 2354 additions and 357 deletions
File diff suppressed because it is too large Load Diff
+30 -255
View File
@@ -1,10 +1,4 @@
{
"app/adapters/cache/backends.py": {
"I001": 1
},
"app/adapters/cache/redis.py": {
"I001": 1
},
"app/adapters/external/cookiecloud.py": {
"I001": 1
},
@@ -27,9 +21,6 @@
"app/adapters/system/display/__init__.py": {
"I001": 1
},
"app/adapters/system/fsproxy.py": {
"E402": 1
},
"app/adapters/system/host.py": {
"I001": 2
},
@@ -39,9 +30,6 @@
"app/adapters/system/plugin/package.py": {
"I001": 1
},
"app/adapters/system/resource.py": {
"I001": 1
},
"app/adapters/system/rust.py": {
"I001": 1
},
@@ -62,14 +50,9 @@
"I001": 1
},
"app/agent/llm/capability.py": {
"E402": 2,
"I001": 1
},
"app/agent/llm/helper.py": {
"E402": 1
},
"app/agent/llm/provider.py": {
"E402": 4,
"I001": 1
},
"app/agent/llm/server_tools.py": {
@@ -78,9 +61,6 @@
"app/agent/mcp.py": {
"I001": 1
},
"app/agent/memory/__init__.py": {
"E402": 4
},
"app/agent/middleware/memory.py": {
"I001": 1
},
@@ -100,8 +80,8 @@
"I001": 1
},
"app/agent/orchestrator.py": {
"E402": 14,
"I001": 3
"E402": 11,
"I001": 2
},
"app/agent/policy/__init__.py": {
"I001": 1
@@ -119,7 +99,6 @@
"I001": 1
},
"app/agent/prompt/__init__.py": {
"E402": 6,
"I001": 1
},
"app/agent/runtime.py": {
@@ -131,13 +110,8 @@
"app/agent/skills/metadata.py": {
"I001": 1
},
"app/agent/skills/registry.py": {
"E402": 4,
"I001": 1
},
"app/agent/tools/base.py": {
"E402": 5,
"I001": 2
"I001": 1
},
"app/agent/tools/factory.py": {
"I001": 1
@@ -149,12 +123,8 @@
"I001": 1
},
"app/agent/tools/impl/_plugin_tool_utils.py": {
"E402": 8,
"I001": 3
},
"app/agent/tools/impl/_terminal_session.py": {
"E402": 1
},
"app/agent/tools/impl/_torrent_search_utils.py": {
"I001": 1
},
@@ -162,7 +132,6 @@
"I001": 1
},
"app/agent/tools/impl/add_download_tasks.py": {
"E402": 7,
"I001": 1
},
"app/agent/tools/impl/add_subscribe.py": {
@@ -175,7 +144,6 @@
"I001": 1
},
"app/agent/tools/impl/create_agent_task.py": {
"E402": 3,
"I001": 1
},
"app/agent/tools/impl/delete_custom_filter_rule.py": {
@@ -202,9 +170,6 @@
"app/agent/tools/impl/list_directory.py": {
"I001": 1
},
"app/agent/tools/impl/query_agent_tasks.py": {
"E402": 1
},
"app/agent/tools/impl/query_builtin_filter_rules.py": {
"I001": 1
},
@@ -260,7 +225,6 @@
"I001": 1
},
"app/agent/tools/impl/recognize_media.py": {
"E402": 6,
"I001": 1
},
"app/agent/tools/impl/reload_plugin.py": {
@@ -270,7 +234,6 @@
"I001": 1
},
"app/agent/tools/impl/scrape_metadata.py": {
"E402": 6,
"I001": 1
},
"app/agent/tools/impl/search_media.py": {
@@ -285,14 +248,10 @@
"app/agent/tools/impl/search_torrents.py": {
"I001": 1
},
"app/agent/tools/impl/search_web.py": {
"E402": 1
},
"app/agent/tools/impl/send_local_file.py": {
"I001": 1
},
"app/agent/tools/impl/send_voice_message.py": {
"E402": 3,
"I001": 1
},
"app/agent/tools/impl/test_site.py": {
@@ -304,9 +263,6 @@
"app/agent/tools/impl/uninstall_plugin.py": {
"I001": 1
},
"app/agent/tools/impl/update_agent_task.py": {
"E402": 2
},
"app/agent/tools/impl/update_custom_filter_rule.py": {
"I001": 1
},
@@ -398,12 +354,6 @@
"app/application/outbox.py": {
"I001": 1
},
"app/application/plugin/catalog.py": {
"I001": 1
},
"app/application/plugin/install.py": {
"I001": 1
},
"app/application/plugin/runtime.py": {
"I001": 1
},
@@ -470,10 +420,6 @@
"app/chain/transfer.py": {
"E402": 21
},
"app/cli.py": {
"E402": 4,
"I001": 1
},
"app/command.py": {
"I001": 1
},
@@ -486,9 +432,6 @@
"app/db/adapters/outbox.py": {
"I001": 1
},
"app/db/adapters/site.py": {
"I001": 1
},
"app/db/adapters/transaction.py": {
"I001": 1
},
@@ -597,10 +540,6 @@
"app/doctor/__init__.py": {
"I001": 1
},
"app/doctor/checks.py": {
"E402": 3,
"I001": 1
},
"app/doctor/dependencies.py": {
"I001": 1
},
@@ -608,12 +547,10 @@
"I001": 1
},
"app/doctor/runner.py": {
"E402": 4,
"I001": 1
},
"app/domain/context.py": {
"E731": 1,
"I001": 1
"E731": 1
},
"app/domain/media.py": {
"E731": 1
@@ -660,10 +597,6 @@
"app/domain/title.py": {
"I001": 1
},
"app/factory.py": {
"E402": 9,
"I001": 2
},
"app/foundation/collections.py": {
"I001": 1
},
@@ -693,23 +626,18 @@
"I001": 1
},
"app/modules/acoustid/__init__.py": {
"E402": 4,
"I001": 1
},
"app/modules/anilist/__init__.py": {
"E402": 8,
"I001": 2
"I001": 1
},
"app/modules/anilist/anilist.py": {
"E402": 2,
"I001": 1
},
"app/modules/bangumi/__init__.py": {
"E402": 9,
"I001": 2
"I001": 1
},
"app/modules/bangumi/bangumi.py": {
"E402": 1,
"I001": 1
},
"app/modules/discord/__init__.py": {
@@ -717,17 +645,14 @@
"I001": 1
},
"app/modules/discord/discord.py": {
"E402": 6,
"E741": 1,
"F541": 2,
"I001": 2
"I001": 1
},
"app/modules/douban/__init__.py": {
"E402": 16,
"I001": 2
"I001": 1
},
"app/modules/douban/apiv2.py": {
"E402": 2,
"I001": 1
},
"app/modules/douban/scraper.py": {
@@ -738,66 +663,36 @@
"I001": 1
},
"app/modules/emby/emby.py": {
"E402": 6,
"F541": 33,
"I001": 2
"I001": 1
},
"app/modules/fanart/__init__.py": {
"E402": 5,
"I001": 2
"I001": 1
},
"app/modules/feishu/__init__.py": {
"F401": 1,
"I001": 1
},
"app/modules/feishu/feishu.py": {
"E402": 10,
"I001": 2
"I001": 1
},
"app/modules/filemanager/__init__.py": {
"I001": 1
},
"app/modules/filemanager/module.py": {
"E402": 20,
"I001": 2
},
"app/modules/filemanager/storages/alipan.py": {
"E402": 7
},
"app/modules/filemanager/storages/alist.py": {
"E402": 7
},
"app/modules/filemanager/storages/local.py": {
"E402": 7
},
"app/modules/filemanager/storages/rclone.py": {
"E402": 6
},
"app/modules/filemanager/storages/smb.py": {
"E402": 5
},
"app/modules/filemanager/storages/u115.py": {
"E402": 7
"I001": 1
},
"app/modules/filemanager/transhandler.py": {
"E402": 21,
"F541": 2,
"I001": 2
"I001": 1
},
"app/modules/filter/__init__.py": {
"I001": 1
},
"app/modules/imdb/__init__.py": {
"E402": 5
},
"app/modules/imdb/api.py": {
"E402": 1
},
"app/modules/indexer/__init__.py": {
"I001": 1
},
"app/modules/indexer/parser/__init__.py": {
"E402": 5,
"I001": 1
},
"app/modules/indexer/parser/bitpt.py": {
@@ -810,9 +705,6 @@
"app/modules/indexer/parser/file_list.py": {
"I001": 1
},
"app/modules/indexer/parser/gazelle.py": {
"I001": 1
},
"app/modules/indexer/parser/hddolby.py": {
"I001": 1
},
@@ -837,7 +729,6 @@
"I001": 1
},
"app/modules/indexer/parser/rousi.py": {
"E402": 4,
"I001": 1
},
"app/modules/indexer/parser/small_horse.py": {
@@ -862,40 +753,31 @@
"I001": 1
},
"app/modules/indexer/spider/__init__.py": {
"E402": 8,
"F541": 1,
"I001": 2
"I001": 1
},
"app/modules/indexer/spider/haidan.py": {
"E402": 6,
"I001": 2
"I001": 1
},
"app/modules/indexer/spider/hddolby.py": {
"E402": 5,
"I001": 2
"I001": 1
},
"app/modules/indexer/spider/mtorrent.py": {
"E402": 6,
"I001": 2
"I001": 1
},
"app/modules/indexer/spider/rousi.py": {
"E402": 6,
"I001": 1
},
"app/modules/indexer/spider/sunnypt.py": {
"E402": 4,
"I001": 1
},
"app/modules/indexer/spider/tnode.py": {
"E402": 4,
"I001": 2
"I001": 1
},
"app/modules/indexer/spider/torrentleech.py": {
"E402": 5,
"I001": 2
"I001": 1
},
"app/modules/indexer/spider/yema.py": {
"E402": 4,
"I001": 1
},
"app/modules/jellyfin/__init__.py": {
@@ -903,24 +785,19 @@
"I001": 1
},
"app/modules/jellyfin/jellyfin.py": {
"E402": 7,
"F541": 34,
"I001": 2
"I001": 1
},
"app/modules/listenbrainz/__init__.py": {
"E402": 5,
"I001": 1
},
"app/modules/lrclib/__init__.py": {
"E402": 6,
"I001": 1
},
"app/modules/musicbrainz/__init__.py": {
"E402": 10,
"I001": 1
},
"app/modules/musicbrainz/music_cache.py": {
"E402": 5,
"I001": 1
},
"app/modules/navidrome/__init__.py": {
@@ -953,10 +830,6 @@
"app/modules/qqbot/module.py": {
"I001": 1
},
"app/modules/qqbot/qqbot.py": {
"E402": 9,
"I001": 2
},
"app/modules/rtorrent/__init__.py": {
"F541": 2,
"I001": 1
@@ -970,11 +843,9 @@
"I001": 1
},
"app/modules/slack/slack.py": {
"E402": 6,
"I001": 2
"I001": 1
},
"app/modules/subtitle/__init__.py": {
"E402": 7,
"I001": 1
},
"app/modules/synologychat/__init__.py": {
@@ -996,46 +867,32 @@
"I001": 3
},
"app/modules/theaudiodb/__init__.py": {
"E402": 8,
"I001": 1
},
"app/modules/themoviedb/__init__.py": {
"E402": 15,
"I001": 2
"I001": 1
},
"app/modules/themoviedb/category.py": {
"E402": 3,
"F541": 1,
"I001": 1
},
"app/modules/themoviedb/scraper.py": {
"E402": 5,
"I001": 1
},
"app/modules/themoviedb/tmdb_cache.py": {
"E402": 4,
"I001": 1
},
"app/modules/themoviedb/tmdbapi.py": {
"E402": 6,
"I001": 2
"I001": 1
},
"app/modules/themoviedb/tmdbv3api/__init__.py": {
"F401": 25
},
"app/modules/themoviedb/tmdbv3api/objs/discover.py": {
"E402": 1
},
"app/modules/themoviedb/tmdbv3api/tmdb.py": {
"E402": 2,
"I001": 2
},
"app/modules/thetvdb/__init__.py": {
"E402": 4,
"I001": 1
},
"app/modules/thetvdb/tvdb_v4_official.py": {
"E402": 1
"app/modules/thetvdb/__init__.py": {
"I001": 1
},
"app/modules/transmission/__init__.py": {
"F541": 2,
@@ -1048,7 +905,6 @@
"I001": 1
},
"app/modules/trimemedia/api.py": {
"E402": 2,
"I001": 1
},
"app/modules/trimemedia/module.py": {
@@ -1077,8 +933,7 @@
"I001": 1
},
"app/modules/webpush/__init__.py": {
"E402": 4,
"I001": 2
"I001": 1
},
"app/modules/wechat/__init__.py": {
"F541": 3,
@@ -1088,15 +943,10 @@
"F541": 1,
"I001": 1
},
"app/modules/wechat/wechatbot.py": {
"E402": 10,
"I001": 2
},
"app/modules/wechatclawbot/__init__.py": {
"I001": 1
},
"app/modules/wechatclawbot/wechatclawbot.py": {
"E402": 6,
"I001": 1
},
"app/modules/zspace/__init__.py": {
@@ -1149,14 +999,10 @@
"app/runtime/event/errors.py": {
"I001": 1
},
"app/runtime/events.py": {
"I001": 1
},
"app/runtime/execution.py": {
"I001": 1
},
"app/runtime/extensions/host_module_adapter.py": {
"E402": 2,
"I001": 1
},
"app/runtime/extensions/managed_resource_adapter.py": {
@@ -1166,12 +1012,8 @@
"I001": 1
},
"app/runtime/extensions/module_manager.py": {
"E402": 4,
"I001": 1
},
"app/runtime/extensions/plugin/catalog.py": {
"E402": 5
},
"app/runtime/extensions/plugin/lifecycle.py": {
"I001": 1
},
@@ -1182,8 +1024,7 @@
"I001": 1
},
"app/runtime/extensions/plugin_manager.py": {
"E402": 21,
"I001": 2
"I001": 1
},
"app/runtime/extensions/service_config.py": {
"I001": 1
@@ -1207,12 +1048,8 @@
"app/runtime/reload.py": {
"I001": 1
},
"app/runtime/settings.py": {
"I001": 1
},
"app/runtime/state.py": {
"E402": 3,
"I001": 2
"I001": 1
},
"app/schemas/agent.py": {
"I001": 1
@@ -1223,9 +1060,6 @@
"app/schemas/context.py": {
"I001": 1
},
"app/schemas/event.py": {
"I001": 1
},
"app/schemas/file.py": {
"I001": 1
},
@@ -1271,9 +1105,6 @@
"app/sdk/config.py": {
"I001": 1
},
"app/sdk/events.py": {
"I001": 1
},
"app/sdk/logging.py": {
"I001": 1
},
@@ -1292,21 +1123,6 @@
"app/sdk/utilities.py": {
"I001": 1
},
"app/startup/initializers/agent.py": {
"E402": 3
},
"app/startup/initializers/database.py": {
"E402": 5
},
"app/startup/initializers/domain.py": {
"E402": 1
},
"app/startup/initializers/modules.py": {
"E402": 79
},
"app/startup/initializers/plugins.py": {
"E402": 25
},
"app/startup/lifecycle/__init__.py": {
"E402": 27,
"F401": 1
@@ -1314,9 +1130,6 @@
"app/workflow/__init__.py": {
"F401": 1
},
"scripts/architecture/baseline.py": {
"I001": 1
},
"scripts/architecture/task_ownership.py": {
"I001": 1
},
@@ -1432,9 +1245,6 @@
"tests/test_agent_summarization_streaming.py": {
"I001": 1
},
"tests/test_agent_task_run_migration.py": {
"I001": 1
},
"tests/test_agent_task_runs.py": {
"I001": 1
},
@@ -1465,9 +1275,6 @@
"tests/test_api_response.py": {
"I001": 1
},
"tests/test_architecture_ci.py": {
"I001": 1
},
"tests/test_architecture_contract_baseline.py": {
"I001": 1
},
@@ -1605,10 +1412,6 @@
"tests/test_episode_group_recognition.py": {
"E402": 4
},
"tests/test_event_contracts.py": {
"F401": 1,
"I001": 1
},
"tests/test_event_dispatch_snapshot.py": {
"I001": 1
},
@@ -1662,12 +1465,8 @@
"tests/test_legacy_import_compat.py": {
"I001": 1
},
"tests/test_legacy_plugin_resource_imports.py": {
"I001": 1
},
"tests/test_lifecycle_shutdown.py": {
"F841": 1,
"I001": 1
"F841": 1
},
"tests/test_llm_provider_bedrock.py": {
"I001": 1
@@ -1777,9 +1576,6 @@
"tests/test_module_manager_capability_adapter.py": {
"I001": 1
},
"tests/test_module_method_contracts.py": {
"I001": 1
},
"tests/test_module_quality.py": {
"I001": 1
},
@@ -1838,9 +1634,6 @@
"tests/test_musicbrainz_module.py": {
"I001": 1
},
"tests/test_mypy_gate.py": {
"I001": 1
},
"tests/test_navidrome_module.py": {
"I001": 1
},
@@ -1868,16 +1661,8 @@
"tests/test_plugin_dependency_service.py": {
"I001": 1
},
"tests/test_plugin_endpoint.py": {
"F401": 1,
"I001": 1
},
"tests/test_plugin_helper.py": {
"F401": 2,
"I001": 11
},
"tests/test_plugin_install_command.py": {
"I001": 1
"F401": 2
},
"tests/test_plugin_lifecycle_status.py": {
"F401": 1
@@ -2039,9 +1824,6 @@
"tests/test_testing_bootstrap_plugin_namespace.py": {
"I001": 1
},
"tests/test_tmdb_auxiliary.py": {
"F401": 1
},
"tests/test_tmdb_cache_management.py": {
"I001": 1
},
@@ -2133,16 +1915,9 @@
"tests/test_uvicorn_entrypoint.py": {
"I001": 1
},
"tests/test_web_agent_stream.py": {
"F401": 1,
"I001": 1
},
"tests/test_webpush_helper.py": {
"I001": 1
},
"tests/test_workflow_actions.py": {
"I001": 1
},
"tests/test_workflow_authorization.py": {
"I001": 1
},