Skip to content

refactor(api): replace test fixture side-effect imports#34421

Merged
WH-2099 merged 2 commits intomainfrom
codex-refactor-remove-pytest-fixture-import-whitelist
Apr 2, 2026
Merged

refactor(api): replace test fixture side-effect imports#34421
WH-2099 merged 2 commits intomainfrom
codex-refactor-remove-pytest-fixture-import-whitelist

Conversation

@WH-2099
Copy link
Copy Markdown
Member

@WH-2099 WH-2099 commented Apr 1, 2026

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Fixes #34420.

This refactor removes the broad Ruff lint.pyflakes.allowed-unused-imports exceptions for tests.integration_tests and tests.unit_tests by making pytest fixture loading explicit in the affected backend tests.

It replaces side-effect fixture imports with local pytest_plugins declarations, 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 current PluginToolProviderEntity schema so the representative plugin test continues to pass.

Screenshots

Before After
N/A N/A

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

Verification

  • api/.venv/bin/ruff check api
  • DEBUG=false MOCK_SWITCH=true api/.venv/bin/pytest -q api/tests/integration_tests/plugin/tools/test_fetch_all_tools.py
  • DEBUG=false MOCK_SWITCH=true api/.venv/bin/pytest -q api/tests/integration_tests/workflow/nodes/test_code.py -k test_execute_code
  • DEBUG=false MOCK_SWITCH=true api/.venv/bin/pytest -q api/tests/integration_tests/vdb/upstash/test_upstash_vector.py
  • DEBUG=false api/.venv/bin/pytest -q api/tests/unit_tests/oss/tencent_cos/test_tencent_cos.py -k TestTencentCos

@WH-2099 WH-2099 self-assigned this Apr 1, 2026
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. refactor labels Apr 1, 2026
@WH-2099 WH-2099 enabled auto-merge April 1, 2026 18:25
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

Pyrefly Diff

base → 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
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.95%. Comparing base (2d29345) to head (f911a4a).
⚠️ Report is 4 commits behind head on main.

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           
Flag Coverage Δ
api 80.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_plugins declarations across affected integration/unit tests.
  • Removed Ruff Pyflakes allowed-unused-imports allowlist for test packages.
  • Updated api/tests/integration_tests/plugin/__mock/http.py mock response to the current PluginToolProviderEntity schema.

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

Pyrefly Diff

base → 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]

@QuantumGhost QuantumGhost removed the request for review from laipz8200 April 2, 2026 04:39
@WH-2099 WH-2099 added this pull request to the merge queue Apr 2, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 2, 2026
Merged via the queue into main with commit cd406d2 Apr 2, 2026
32 checks passed
@WH-2099 WH-2099 deleted the codex-refactor-remove-pytest-fixture-import-whitelist branch April 2, 2026 05:04
volcano303 pushed a commit to volcano303/dify that referenced this pull request Apr 7, 2026
HanqingZ pushed a commit to HanqingZ/dify that referenced this pull request Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer refactor size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor/Chore] Remove broad pytest fixture unused-import allowlist

3 participants