refactor(api): replace test fixture side-effect imports#34421
Conversation
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-01 18:25:37.950159195 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-01 18:25:27.044099915 +0000
@@ -455,7 +455,7 @@
ERROR Class member `MockModelClass.invoke_llm` overrides parent class `PluginModelClient` in an inconsistent manner [bad-override]
--> tests/integration_tests/model_runtime/__mock/plugin_model.py:235:9
ERROR `unpatch` may be uninitialized [unbound-name]
- --> tests/integration_tests/plugin/__mock/http.py:62:9
+ --> tests/integration_tests/plugin/__mock/http.py:67:9
ERROR Object of class `TestWorkflowDraftVariableServiceResetVariable` has no attribute `_test_user_id` [missing-attribute]
--> tests/integration_tests/services/test_workflow_draft_variable_service.py:610:21
ERROR Object of class `TestWorkflowDraftVariableServiceResetVariable` has no attribute `_test_user_id` [missing-attribute]
@@ -475,63 +475,63 @@
ERROR Argument `FilterIndexConfig | None` is not assignable to parameter `filter_index_config` with type `FilterIndexConfig` in function `tcvectordb.rpc.model.collection.RPCCollection.__init__` [bad-argument-type]
--> tests/integration_tests/vdb/__mock/tcvectordb.py:95:33
ERROR Missing argument `min_connection` in function `core.rag.datasource.vdb.analyticdb.analyticdb_vector_sql.AnalyticdbVectorBySqlConfig.__init__` [missing-argument]
- --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:16:55
+ --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:18:55
ERROR Missing argument `max_connection` in function `core.rag.datasource.vdb.analyticdb.analyticdb_vector_sql.AnalyticdbVectorBySqlConfig.__init__` [missing-argument]
- --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:16:55
+ --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:18:55
ERROR Object of class `NoneType` has no attribute `delete` [missing-attribute]
- --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:43:9
+ --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:45:9
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/baidu/test_baidu.py:22:26
+ --> tests/integration_tests/vdb/baidu/test_baidu.py:26:26
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/baidu/test_baidu.py:26:29
+ --> tests/integration_tests/vdb/baidu/test_baidu.py:30:29
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/chroma/test_chroma.py:28:29
+ --> tests/integration_tests/vdb/chroma/test_chroma.py:29:29
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/couchbase/test_couchbase.py:43:26
+ --> tests/integration_tests/vdb/couchbase/test_couchbase.py:44:26
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:41:29
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:45:29
ERROR Object of class `NoneType` has no attribute `add_texts` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:63:9
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:67:9
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:66:16
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:70:16
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:74:20
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:78:20
ERROR Object of class `NoneType` has no attribute `add_texts` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:90:9
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:94:9
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:93:16
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:97:16
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:103:15
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:107:15
ERROR Object of class `NoneType` has no attribute `delete` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:109:9
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:113:9
ERROR Object of class `NoneType` has no attribute `create` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:116:13
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:120:13
ERROR Object of class `NoneType` has no attribute `delete` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:133:13
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:137:13
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/huawei/test_huawei_cloud.py:19:26
+ --> tests/integration_tests/vdb/huawei/test_huawei_cloud.py:23:26
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/huawei/test_huawei_cloud.py:23:29
+ --> tests/integration_tests/vdb/huawei/test_huawei_cloud.py:27:29
ERROR Missing argument `using_ugc` in function `core.rag.datasource.vdb.lindorm.lindorm_vector.LindormVectorStore.__init__` [missing-argument]
- --> tests/integration_tests/vdb/lindorm/test_lindorm.py:19:41
+ --> tests/integration_tests/vdb/lindorm/test_lindorm.py:21:41
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/lindorm/test_lindorm.py:29:15
+ --> tests/integration_tests/vdb/lindorm/test_lindorm.py:31:15
ERROR Missing argument `using_ugc` in function `core.rag.datasource.vdb.lindorm.lindorm_vector.LindormVectorStore.__init__` [missing-argument]
- --> tests/integration_tests/vdb/lindorm/test_lindorm.py:38:41
+ --> tests/integration_tests/vdb/lindorm/test_lindorm.py:40:41
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/lindorm/test_lindorm.py:50:15
+ --> tests/integration_tests/vdb/lindorm/test_lindorm.py:52:15
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/matrixone/test_matrixone.py:19:15
+ --> tests/integration_tests/vdb/matrixone/test_matrixone.py:20:15
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/milvus/test_milvus.py:23:29
+ --> tests/integration_tests/vdb/milvus/test_milvus.py:24:29
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/milvus/test_milvus.py:27:15
+ --> tests/integration_tests/vdb/milvus/test_milvus.py:28:15
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/myscale/test_myscale.py:24:15
+ --> tests/integration_tests/vdb/myscale/test_myscale.py:25:15
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/oceanbase/test_oceanbase.py:35:15
+ --> tests/integration_tests/vdb/oceanbase/test_oceanbase.py:36:15
ERROR `config` may be uninitialized [unbound-name]
- --> tests/integration_tests/vdb/opengauss/test_opengauss.py:36:20
+ --> tests/integration_tests/vdb/opengauss/test_opengauss.py:37:20
ERROR Argument `list[Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
--> tests/integration_tests/vdb/opensearch/test_opensearch.py:163:20
ERROR `None` is not subscriptable [unsupported-operation]
@@ -541,53 +541,53 @@
ERROR `None` is not subscriptable [unsupported-operation]
--> tests/integration_tests/vdb/opensearch/test_opensearch.py:181:16
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/oracle/test_oraclevector.py:23:45
+ --> tests/integration_tests/vdb/oracle/test_oraclevector.py:24:45
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py:26:29
+ --> tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py:27:29
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py:30:15
+ --> tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py:31:15
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:31:42
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:32:42
ERROR Object of class `NoneType` has no attribute `add_texts` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:61:9
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:62:9
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:66:22
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:67:22
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:71:23
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:72:23
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:77:16
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:78:16
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:87:19
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:88:19
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:34:15
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:35:15
ERROR Object of class `NoneType` has no attribute `create` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:40:9
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:41:9
ERROR Object of class `NoneType` has no attribute `_tablestore_client` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:45:31
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:46:31
ERROR Object of class `NoneType` has no attribute `_table_name` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:46:28
-ERROR Object of class `NoneType` has no attribute `_index_name` [missing-attribute]
--> tests/integration_tests/vdb/tablestore/test_tablestore.py:47:28
+ERROR Object of class `NoneType` has no attribute `_index_name` [missing-attribute]
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:48:28
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:56:16
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:57:16
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:61:16
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:62:16
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:66:16
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:67:16
ERROR Object of class `NoneType` has no attribute `_config` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:69:12
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:70:12
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:75:16
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:76:16
ERROR Object of class `NoneType` has no attribute `_config` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:78:12
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:79:12
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:85:16
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:86:16
ERROR Object of class `NoneType` has no attribute `delete` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:90:13
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:91:13
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/tcvectordb/test_tencent.py:29:26
+ --> tests/integration_tests/vdb/tcvectordb/test_tencent.py:33:26
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/tcvectordb/test_tencent.py:33:29
+ --> tests/integration_tests/vdb/tcvectordb/test_tencent.py:37:29
ERROR Object of class `NoneType` has no attribute `create` [missing-attribute]
--> tests/integration_tests/vdb/test_vector_store.py:52:9
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
@@ -607,35 +607,35 @@
ERROR `connection` may be uninitialized [unbound-name]
--> tests/integration_tests/vdb/tidb_vector/check_tiflash_ready.py:30:12
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/tidb_vector/test_tidb_vector.py:29:45
+ --> tests/integration_tests/vdb/tidb_vector/test_tidb_vector.py:31:45
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/tidb_vector/test_tidb_vector.py:33:15
+ --> tests/integration_tests/vdb/tidb_vector/test_tidb_vector.py:35:15
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/upstash/test_upstash_vector.py:19:15
+ --> tests/integration_tests/vdb/upstash/test_upstash_vector.py:20:15
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/upstash/test_upstash_vector.py:23:45
+ --> tests/integration_tests/vdb/upstash/test_upstash_vector.py:24:45
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:24:26
+ --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:28:26
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:28:29
+ --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:32:29
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:32:15
+ --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:36:15
ERROR Argument `Literal['unsupported_language']` is not assignable to parameter `language` with type `CodeLanguage` in function `core.helper.code_executor.code_executor.CodeExecutor.execute_workflow_code_template` [bad-argument-type]
--> tests/integration_tests/workflow/nodes/code_executor/test_code_executor.py:10:62
ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.code.code_node.CodeNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_code.py:67:16
+ --> tests/integration_tests/workflow/nodes/test_code.py:68:16
ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_http.py:78:16
+ --> tests/integration_tests/workflow/nodes/test_http.py:79:16
ERROR Argument `type[ToolFileManager]` is not assignable to parameter `tool_file_manager_factory` with type `() -> ToolFileManagerProtocol` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_http.py:83:35
+ --> tests/integration_tests/workflow/nodes/test_http.py:84:35
ERROR Argument `dict[str, dict[str, dict[str, dict[str, str] | str] | str | Unknown | None] | str] | dict[str, dict[str, str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_http.py:727:16
+ --> tests/integration_tests/workflow/nodes/test_http.py:728:16
ERROR Argument `type[ToolFileManager]` is not assignable to parameter `tool_file_manager_factory` with type `() -> ToolFileManagerProtocol` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_http.py:732:35
+ --> tests/integration_tests/workflow/nodes/test_http.py:733:35
ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.llm.node.LLMNode.__init__` [bad-argument-type]
--> tests/integration_tests/workflow/nodes/test_llm.py:80:16
ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.parameter_extractor.parameter_extractor_node.ParameterExtractorNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_parameter_extractor.py:75:16
+ --> tests/integration_tests/workflow/nodes/test_parameter_extractor.py:74:16
ERROR Argument `dict[str, dict[str, list[dict[str, list[str] | str]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.template_transform.template_transform_node.TemplateTransformNode.__init__` [bad-argument-type]
--> tests/integration_tests/workflow/nodes/test_template_transform.py:91:16
ERROR Argument `_SimpleJinja2Renderer` is not assignable to parameter `jinja2_template_renderer` with type `Jinja2TemplateRenderer` in function `graphon.nodes.template_transform.template_transform_node.TemplateTransformNode.__init__` [bad-argument-type]
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #34421 +/- ##
=======================================
Coverage 81.95% 81.95%
=======================================
Files 4496 4496
Lines 176611 176611
Branches 34968 34968
=======================================
Hits 144747 144747
Misses 28991 28991
Partials 2873 2873
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR refactors backend tests to stop relying on side-effect fixture imports, enabling removal of broad Ruff lint.pyflakes.allowed-unused-imports exceptions for tests.integration_tests and tests.unit_tests. It makes pytest fixture discovery explicit via module-level pytest_plugins, and updates a plugin tool mock payload to match the current PluginToolProviderEntity schema.
Changes:
- Replaced unused “fixture registration” imports with
pytest_pluginsdeclarations across affected integration/unit tests. - Removed Ruff Pyflakes
allowed-unused-importsallowlist for test packages. - Updated
api/tests/integration_tests/plugin/__mock/http.pymock response to the currentPluginToolProviderEntityschema.
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| api/tests/unit_tests/oss/volcengine_tos/test_volcengine_tos.py | Switch fixture module loading to pytest_plugins for Volcengine TOS unit tests. |
| api/tests/unit_tests/oss/tencent_cos/test_tencent_cos.py | Switch fixture module loading to pytest_plugins for Tencent COS unit tests. |
| api/tests/unit_tests/oss/aliyun_oss/aliyun_oss/test_aliyun_oss.py | Switch fixture module loading to pytest_plugins for Aliyun OSS unit tests. |
| api/tests/integration_tests/workflow/nodes/test_parameter_extractor.py | Replace side-effect mock fixture import with pytest_plugins for model daemon mocking. |
| api/tests/integration_tests/workflow/nodes/test_http.py | Replace side-effect HTTP mock fixture import with pytest_plugins. |
| api/tests/integration_tests/workflow/nodes/test_code.py | Replace side-effect code executor mock import with pytest_plugins. |
| api/tests/integration_tests/vdb/weaviate/test_weaviate.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/vikingdb/test_vikingdb.py | Load shared VDB + VikingDB mock fixtures via pytest_plugins. |
| api/tests/integration_tests/vdb/upstash/test_upstash_vector.py | Load Upstash VDB mock fixture via pytest_plugins. |
| api/tests/integration_tests/vdb/tidb_vector/test_tidb_vector.py | Load shared VDB fixtures via pytest_plugins to provide setup_mock_redis. |
| api/tests/integration_tests/vdb/tcvectordb/test_tencent.py | Load shared VDB + Tencent VectorDB mock fixtures via pytest_plugins. |
| api/tests/integration_tests/vdb/tablestore/test_tablestore.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/qdrant/test_qdrant.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/pyvastbase/test_vastbase_vector.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/pgvector/test_pgvector.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/oracle/test_oraclevector.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/opengauss/test_opengauss.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/oceanbase/test_oceanbase.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/myscale/test_myscale.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/milvus/test_milvus.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/matrixone/test_matrixone.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/lindorm/test_lindorm.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/iris/test_iris.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/huawei/test_huawei_cloud.py | Load shared VDB + Huawei mock fixtures via pytest_plugins. |
| api/tests/integration_tests/vdb/hologres/test_hologres.py | Load shared VDB + Hologres mock fixtures via pytest_plugins. |
| api/tests/integration_tests/vdb/elasticsearch/test_elasticsearch.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/couchbase/test_couchbase.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/chroma/test_chroma.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/vdb/baidu/test_baidu.py | Load shared VDB + Baidu mock fixtures via pytest_plugins. |
| api/tests/integration_tests/vdb/analyticdb/test_analyticdb.py | Load shared VDB fixtures via pytest_plugins instead of unused imports. |
| api/tests/integration_tests/tools/api_tool/test_api_tool.py | Replace side-effect HTTP mock fixture import with pytest_plugins. |
| api/tests/integration_tests/plugin/tools/test_fetch_all_tools.py | Replace side-effect HTTP mock fixture import with pytest_plugins. |
| api/tests/integration_tests/plugin/__mock/http.py | Update mocked /tools response payload to use PluginToolProviderEntity schema. |
| api/.ruff.toml | Remove Pyflakes allowed-unused-imports allowlist for test packages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-02 03:33:46.481799453 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-02 03:33:35.371702308 +0000
@@ -455,7 +455,7 @@
ERROR Class member `MockModelClass.invoke_llm` overrides parent class `PluginModelClient` in an inconsistent manner [bad-override]
--> tests/integration_tests/model_runtime/__mock/plugin_model.py:235:9
ERROR `unpatch` may be uninitialized [unbound-name]
- --> tests/integration_tests/plugin/__mock/http.py:62:9
+ --> tests/integration_tests/plugin/__mock/http.py:67:9
ERROR Object of class `TestWorkflowDraftVariableServiceResetVariable` has no attribute `_test_user_id` [missing-attribute]
--> tests/integration_tests/services/test_workflow_draft_variable_service.py:610:21
ERROR Object of class `TestWorkflowDraftVariableServiceResetVariable` has no attribute `_test_user_id` [missing-attribute]
@@ -475,63 +475,63 @@
ERROR Argument `FilterIndexConfig | None` is not assignable to parameter `filter_index_config` with type `FilterIndexConfig` in function `tcvectordb.rpc.model.collection.RPCCollection.__init__` [bad-argument-type]
--> tests/integration_tests/vdb/__mock/tcvectordb.py:95:33
ERROR Missing argument `min_connection` in function `core.rag.datasource.vdb.analyticdb.analyticdb_vector_sql.AnalyticdbVectorBySqlConfig.__init__` [missing-argument]
- --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:16:55
+ --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:18:55
ERROR Missing argument `max_connection` in function `core.rag.datasource.vdb.analyticdb.analyticdb_vector_sql.AnalyticdbVectorBySqlConfig.__init__` [missing-argument]
- --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:16:55
+ --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:18:55
ERROR Object of class `NoneType` has no attribute `delete` [missing-attribute]
- --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:43:9
+ --> tests/integration_tests/vdb/analyticdb/test_analyticdb.py:45:9
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/baidu/test_baidu.py:22:26
+ --> tests/integration_tests/vdb/baidu/test_baidu.py:26:26
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/baidu/test_baidu.py:26:29
+ --> tests/integration_tests/vdb/baidu/test_baidu.py:30:29
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/chroma/test_chroma.py:28:29
+ --> tests/integration_tests/vdb/chroma/test_chroma.py:29:29
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/couchbase/test_couchbase.py:43:26
+ --> tests/integration_tests/vdb/couchbase/test_couchbase.py:44:26
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:41:29
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:45:29
ERROR Object of class `NoneType` has no attribute `add_texts` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:63:9
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:67:9
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:66:16
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:70:16
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:74:20
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:78:20
ERROR Object of class `NoneType` has no attribute `add_texts` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:90:9
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:94:9
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:93:16
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:97:16
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:103:15
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:107:15
ERROR Object of class `NoneType` has no attribute `delete` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:109:9
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:113:9
ERROR Object of class `NoneType` has no attribute `create` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:116:13
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:120:13
ERROR Object of class `NoneType` has no attribute `delete` [missing-attribute]
- --> tests/integration_tests/vdb/hologres/test_hologres.py:133:13
+ --> tests/integration_tests/vdb/hologres/test_hologres.py:137:13
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/huawei/test_huawei_cloud.py:19:26
+ --> tests/integration_tests/vdb/huawei/test_huawei_cloud.py:23:26
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/huawei/test_huawei_cloud.py:23:29
+ --> tests/integration_tests/vdb/huawei/test_huawei_cloud.py:27:29
ERROR Missing argument `using_ugc` in function `core.rag.datasource.vdb.lindorm.lindorm_vector.LindormVectorStore.__init__` [missing-argument]
- --> tests/integration_tests/vdb/lindorm/test_lindorm.py:19:41
+ --> tests/integration_tests/vdb/lindorm/test_lindorm.py:21:41
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/lindorm/test_lindorm.py:29:15
+ --> tests/integration_tests/vdb/lindorm/test_lindorm.py:31:15
ERROR Missing argument `using_ugc` in function `core.rag.datasource.vdb.lindorm.lindorm_vector.LindormVectorStore.__init__` [missing-argument]
- --> tests/integration_tests/vdb/lindorm/test_lindorm.py:38:41
+ --> tests/integration_tests/vdb/lindorm/test_lindorm.py:40:41
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/lindorm/test_lindorm.py:50:15
+ --> tests/integration_tests/vdb/lindorm/test_lindorm.py:52:15
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/matrixone/test_matrixone.py:19:15
+ --> tests/integration_tests/vdb/matrixone/test_matrixone.py:20:15
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/milvus/test_milvus.py:23:29
+ --> tests/integration_tests/vdb/milvus/test_milvus.py:24:29
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/milvus/test_milvus.py:27:15
+ --> tests/integration_tests/vdb/milvus/test_milvus.py:28:15
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/myscale/test_myscale.py:24:15
+ --> tests/integration_tests/vdb/myscale/test_myscale.py:25:15
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/oceanbase/test_oceanbase.py:35:15
+ --> tests/integration_tests/vdb/oceanbase/test_oceanbase.py:36:15
ERROR `config` may be uninitialized [unbound-name]
- --> tests/integration_tests/vdb/opengauss/test_opengauss.py:36:20
+ --> tests/integration_tests/vdb/opengauss/test_opengauss.py:37:20
ERROR Argument `list[Unknown] | None` is not assignable to parameter `obj` with type `Sized` in function `len` [bad-argument-type]
--> tests/integration_tests/vdb/opensearch/test_opensearch.py:163:20
ERROR `None` is not subscriptable [unsupported-operation]
@@ -541,53 +541,53 @@
ERROR `None` is not subscriptable [unsupported-operation]
--> tests/integration_tests/vdb/opensearch/test_opensearch.py:181:16
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/oracle/test_oraclevector.py:23:45
+ --> tests/integration_tests/vdb/oracle/test_oraclevector.py:24:45
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py:26:29
+ --> tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py:27:29
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py:30:15
+ --> tests/integration_tests/vdb/pgvecto_rs/test_pgvecto_rs.py:31:15
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:31:42
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:32:42
ERROR Object of class `NoneType` has no attribute `add_texts` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:61:9
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:62:9
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:66:22
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:67:22
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:71:23
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:72:23
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:77:16
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:78:16
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/qdrant/test_qdrant.py:87:19
+ --> tests/integration_tests/vdb/qdrant/test_qdrant.py:88:19
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:34:15
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:35:15
ERROR Object of class `NoneType` has no attribute `create` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:40:9
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:41:9
ERROR Object of class `NoneType` has no attribute `_tablestore_client` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:45:31
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:46:31
ERROR Object of class `NoneType` has no attribute `_table_name` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:46:28
-ERROR Object of class `NoneType` has no attribute `_index_name` [missing-attribute]
--> tests/integration_tests/vdb/tablestore/test_tablestore.py:47:28
+ERROR Object of class `NoneType` has no attribute `_index_name` [missing-attribute]
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:48:28
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:56:16
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:57:16
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:61:16
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:62:16
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:66:16
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:67:16
ERROR Object of class `NoneType` has no attribute `_config` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:69:12
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:70:12
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:75:16
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:76:16
ERROR Object of class `NoneType` has no attribute `_config` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:78:12
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:79:12
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:85:16
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:86:16
ERROR Object of class `NoneType` has no attribute `delete` [missing-attribute]
- --> tests/integration_tests/vdb/tablestore/test_tablestore.py:90:13
+ --> tests/integration_tests/vdb/tablestore/test_tablestore.py:91:13
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/tcvectordb/test_tencent.py:29:26
+ --> tests/integration_tests/vdb/tcvectordb/test_tencent.py:33:26
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/tcvectordb/test_tencent.py:33:29
+ --> tests/integration_tests/vdb/tcvectordb/test_tencent.py:37:29
ERROR Object of class `NoneType` has no attribute `create` [missing-attribute]
--> tests/integration_tests/vdb/test_vector_store.py:52:9
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
@@ -607,35 +607,35 @@
ERROR `connection` may be uninitialized [unbound-name]
--> tests/integration_tests/vdb/tidb_vector/check_tiflash_ready.py:30:12
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/tidb_vector/test_tidb_vector.py:29:45
+ --> tests/integration_tests/vdb/tidb_vector/test_tidb_vector.py:31:45
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/tidb_vector/test_tidb_vector.py:33:15
+ --> tests/integration_tests/vdb/tidb_vector/test_tidb_vector.py:35:15
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/upstash/test_upstash_vector.py:19:15
+ --> tests/integration_tests/vdb/upstash/test_upstash_vector.py:20:15
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/upstash/test_upstash_vector.py:23:45
+ --> tests/integration_tests/vdb/upstash/test_upstash_vector.py:24:45
ERROR Object of class `NoneType` has no attribute `search_by_vector` [missing-attribute]
- --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:24:26
+ --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:28:26
ERROR Object of class `NoneType` has no attribute `search_by_full_text` [missing-attribute]
- --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:28:29
+ --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:32:29
ERROR Object of class `NoneType` has no attribute `get_ids_by_metadata_field` [missing-attribute]
- --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:32:15
+ --> tests/integration_tests/vdb/vikingdb/test_vikingdb.py:36:15
ERROR Argument `Literal['unsupported_language']` is not assignable to parameter `language` with type `CodeLanguage` in function `core.helper.code_executor.code_executor.CodeExecutor.execute_workflow_code_template` [bad-argument-type]
--> tests/integration_tests/workflow/nodes/code_executor/test_code_executor.py:10:62
ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.code.code_node.CodeNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_code.py:67:16
+ --> tests/integration_tests/workflow/nodes/test_code.py:68:16
ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_http.py:78:16
+ --> tests/integration_tests/workflow/nodes/test_http.py:79:16
ERROR Argument `type[ToolFileManager]` is not assignable to parameter `tool_file_manager_factory` with type `() -> ToolFileManagerProtocol` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_http.py:83:35
+ --> tests/integration_tests/workflow/nodes/test_http.py:84:35
ERROR Argument `dict[str, dict[str, dict[str, dict[str, str] | str] | str | Unknown | None] | str] | dict[str, dict[str, str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_http.py:727:16
+ --> tests/integration_tests/workflow/nodes/test_http.py:728:16
ERROR Argument `type[ToolFileManager]` is not assignable to parameter `tool_file_manager_factory` with type `() -> ToolFileManagerProtocol` in function `graphon.nodes.http_request.node.HttpRequestNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_http.py:732:35
+ --> tests/integration_tests/workflow/nodes/test_http.py:733:35
ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.llm.node.LLMNode.__init__` [bad-argument-type]
--> tests/integration_tests/workflow/nodes/test_llm.py:80:16
ERROR Argument `dict[Unknown, Unknown]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.parameter_extractor.parameter_extractor_node.ParameterExtractorNode.__init__` [bad-argument-type]
- --> tests/integration_tests/workflow/nodes/test_parameter_extractor.py:75:16
+ --> tests/integration_tests/workflow/nodes/test_parameter_extractor.py:74:16
ERROR Argument `dict[str, dict[str, list[dict[str, list[str] | str]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `graphon.nodes.template_transform.template_transform_node.TemplateTransformNode.__init__` [bad-argument-type]
--> tests/integration_tests/workflow/nodes/test_template_transform.py:91:16
ERROR Argument `_SimpleJinja2Renderer` is not assignable to parameter `jinja2_template_renderer` with type `Jinja2TemplateRenderer` in function `graphon.nodes.template_transform.template_transform_node.TemplateTransformNode.__init__` [bad-argument-type]
|
Important
Fixes #<issue number>.Summary
Fixes #34420.
This refactor removes the broad Ruff
lint.pyflakes.allowed-unused-importsexceptions fortests.integration_testsandtests.unit_testsby making pytest fixture loading explicit in the affected backend tests.It replaces side-effect fixture imports with local
pytest_pluginsdeclarations, keeps real helper imports explicit, removes truly unused helper imports that were previously hidden by the allowlist, and updates the plugin tool mock response to the currentPluginToolProviderEntityschema so the representative plugin test continues to pass.Screenshots
Checklist
make lintandmake type-check(backend) andcd web && npx lint-staged(frontend) to appease the lint godsVerification
api/.venv/bin/ruff check apiDEBUG=false MOCK_SWITCH=true api/.venv/bin/pytest -q api/tests/integration_tests/plugin/tools/test_fetch_all_tools.pyDEBUG=false MOCK_SWITCH=true api/.venv/bin/pytest -q api/tests/integration_tests/workflow/nodes/test_code.py -k test_execute_codeDEBUG=false MOCK_SWITCH=true api/.venv/bin/pytest -q api/tests/integration_tests/vdb/upstash/test_upstash_vector.pyDEBUG=false api/.venv/bin/pytest -q api/tests/unit_tests/oss/tencent_cos/test_tencent_cos.py -k TestTencentCos