fix(api): avoid OpenSearch import collision with local events package#33825
fix(api): avoid OpenSearch import collision with local events package#33825myshkin451 wants to merge 2 commits intolanggenius:mainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical import collision issue within the Dify Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a compatibility shim for opensearch-py to resolve an import collision with a local events package. The shim correctly mimics the Events class expected by opensearch-py, and includes regression tests. My review includes a suggestion to make the handler removal logic more robust by handling cases where a non-existent handler is removed. This will prevent potential ValueError exceptions and align with common event system patterns, improving the overall robustness of the shim.
a5b1a88 to
4db6ba1
Compare
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-04-08 10:29:07.851312773 +0000
+++ /tmp/pyrefly_pr.txt 2026-04-08 10:28:53.758321042 +0000
@@ -1,7 +1,25 @@
+ERROR `result` may be uninitialized [unbound-name]
+ --> controllers/console/app/annotation.py:126:16
ERROR Object of class `App` has no attribute `access_mode` [missing-attribute]
- --> controllers/console/app/app.py:560:13
+ --> controllers/console/app/app.py:571:13
+ERROR Argument `((*args: Unknown, **kwargs: Unknown) -> OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown] | tuple[OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown], HTTPStatus | Unknown, dict[Unknown, Unknown] | Unknown]) | [P1, R1](view_func: (ParamSpec(P1)) -> R1) -> (ParamSpec(P1)) -> R1` is not assignable to parameter `func` with type `(*args: Unknown, **kwargs: Unknown) -> OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown] | tuple[OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown], HTTPStatus | Unknown, dict[Unknown, Unknown] | Unknown]` in function `libs.login.login_required` [bad-argument-type]
+ --> controllers/console/app/app_import.py:131:5
+ERROR Argument `((*args: Unknown, **kwargs: Unknown) -> OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown] | tuple[OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown], HTTPStatus | Unknown, dict[Unknown, Unknown] | Unknown]) | [P1, R1](view_func: (ParamSpec(P1)) -> R1) -> (ParamSpec(P1)) -> R1` is not assignable to parameter `view` with type `(*args: Unknown, **kwargs: Unknown) -> OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown] | tuple[OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown], HTTPStatus | Unknown, dict[Unknown, Unknown] | Unknown]` in function `controllers.console.wraps.setup_required` [bad-argument-type]
+ --> controllers/console/app/mcp_server.py:46:5
+ERROR Argument `((*args: Unknown, **kwargs: Unknown) -> OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown] | tuple[OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown], HTTPStatus | Unknown, dict[Unknown, Unknown] | Unknown]) | [P1, R1](view_func: (ParamSpec(P1)) -> R1) -> (ParamSpec(P1)) -> R1` is not assignable to parameter `view` with type `(*args: Unknown, **kwargs: Unknown) -> OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown] | tuple[OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown], HTTPStatus | Unknown, dict[Unknown, Unknown] | Unknown]` in function `controllers.console.wraps.account_initialization_required` [bad-argument-type]
+ --> controllers/console/app/site.py:72:5
+ERROR Argument `((*args: Unknown, **kwargs: Unknown) -> OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown] | tuple[OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown], HTTPStatus | Unknown, dict[Unknown, Unknown] | Unknown]) | [P1, R1](view_func: (ParamSpec(P1)) -> R1) -> (ParamSpec(P1)) -> R1` is not assignable to parameter `view` with type `(*args: Unknown, **kwargs: Unknown) -> OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown] | tuple[OrderedDict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | OrderedDict[Unknown, list[Unknown]] | OrderedDict[Unknown, Unknown] | dict[Unknown, OrderedDict[Unknown, Unknown] | dict[Unknown, Unknown]] | dict[Unknown, list[Unknown]] | dict[Unknown, Unknown] | list[Unknown], HTTPStatus | Unknown, dict[Unknown, Unknown] | Unknown]` in function `controllers.console.wraps.account_initialization_required` [bad-argument-type]
+ --> controllers/console/app/site.py:122:5
ERROR Argument `str | None` is not assignable to parameter `language` with type `str` in function `services.account_service.AccountService.send_email_register_email` [bad-argument-type]
--> controllers/console/auth/email_register.py:78:108
+ERROR Argument `WorkflowRun | None` is not assignable to parameter `workflow_run` with type `WorkflowRun` in function `services.workflow_event_snapshot_service.build_workflow_event_stream` [bad-argument-type]
+ --> controllers/console/human_input_form.py:183:42
+ERROR Object of class `NoneType` has no attribute `tenant_id` [missing-attribute]
+ --> controllers/console/human_input_form.py:184:39
+ERROR Object of class `NoneType` has no attribute `app_id` [missing-attribute]
+ --> controllers/console/human_input_form.py:185:36
+ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
+ --> controllers/console/human_input_form.py:190:70
ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
--> controllers/console/init_validate.py:31:2
ERROR Object of class `MissingRouter` has no attribute `post` [missing-attribute]
@@ -14,98 +32,151 @@
--> controllers/console/setup.py:65:2
ERROR Object of class `MissingRouter` has no attribute `get` [missing-attribute]
--> controllers/console/version.py:30:2
+ERROR `result` may be uninitialized [unbound-name]
+ --> controllers/service_api/app/annotation.py:55:16
+ERROR Argument `WorkflowRun | None` is not assignable to parameter `workflow_run` with type `WorkflowRun` in function `services.workflow_event_snapshot_service.build_workflow_event_stream` [bad-argument-type]
+ --> controllers/web/workflow_events.py:89:42
+ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
+ --> controllers/web/workflow_events.py:96:61
+ERROR Runtime checkable protocol `Generator` has an unsafe overlap with type `Generator[LLMResultChunk] | LLMResult` [unsafe-overlap]
+ --> core/agent/fc_agent_runner.py:114:35
+ERROR Object of class `Base` has no attribute `id` [missing-attribute]
+ --> core/app/apps/advanced_chat/app_generator.py:698:49
+ERROR Argument `AppBlockingResponse | Generator[AppStreamResponse, Any]` is not assignable to parameter `stream_response` with type `Generator[AppStreamResponse]` in function `AppGenerateResponseConverter.convert_stream_full_response` [bad-argument-type]
+ --> core/app/apps/base_app_generate_response_converter.py:27:65
+ERROR Argument `AppBlockingResponse | Generator[AppStreamResponse, Any]` is not assignable to parameter `stream_response` with type `Generator[AppStreamResponse]` in function `AppGenerateResponseConverter.convert_stream_simple_response` [bad-argument-type]
+ --> core/app/apps/base_app_generate_response_converter.py:36:67
+ERROR Argument `Account | EndUser` is not assignable to parameter `user` with type `Account` in function `services.workflow_draft_variable_service.DraftVariableSaver.__init__` [bad-argument-type]
+ --> core/app/apps/base_app_generator.py:243:26
+ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
+ --> core/app/apps/chat/app_generator.py:187:33
+ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
+ --> core/app/apps/completion/app_generator.py:333:28
ERROR Class member `EasyUIBasedGenerateTaskPipeline._application_generate_entity` overrides parent class `BasedGenerateTaskPipeline` in an inconsistent manner [bad-override]
--> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:75:5
ERROR `+=` is not supported between `list[PromptMessageContentUnionTypes]` and `str` [unsupported-operation]
- --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:323:29
+ --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:325:29
ERROR Argument `list[Unknown]` is not assignable to parameter `value` with type `SQLCoreOperations[dict[str, Any]] | dict[str, Any]` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
- --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:390:27
-ERROR `defaultdict[str, dict[Unknown, Unknown]]` is not assignable to `defaultdict[ModelType, dict[str, ModelSettings]]` [bad-assignment]
- --> core/entities/provider_configuration.py:1531:79
+ --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:392:27
ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, int], stream=Literal[False]) [no-matching-overload]
- --> core/llm_generator/llm_generator.py:85:60
+ --> core/llm_generator/llm_generator.py:73:60
ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, float | int], stream=Literal[False]) [no-matching-overload]
- --> core/llm_generator/llm_generator.py:148:60
+ --> core/llm_generator/llm_generator.py:136:60
ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, Any], stream=Literal[False]) [no-matching-overload]
- --> core/llm_generator/llm_generator.py:197:64
+ --> core/llm_generator/llm_generator.py:185:64
ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, Any], stream=Literal[False]) [no-matching-overload]
- --> core/llm_generator/llm_generator.py:245:70
+ --> core/llm_generator/llm_generator.py:233:70
ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, Any], stream=Literal[False]) [no-matching-overload]
- --> core/llm_generator/llm_generator.py:276:73
+ --> core/llm_generator/llm_generator.py:264:73
ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, Any], stream=Literal[False]) [no-matching-overload]
- --> core/llm_generator/llm_generator.py:285:73
+ --> core/llm_generator/llm_generator.py:273:73
ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[UserPromptMessage], model_parameters=dict[str, Any], stream=Literal[False]) [no-matching-overload]
- --> core/llm_generator/llm_generator.py:332:60
+ --> core/llm_generator/llm_generator.py:320:60
ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[SystemPromptMessage | UserPromptMessage], model_parameters=dict[str, Any], stream=Literal[False]) [no-matching-overload]
- --> core/llm_generator/llm_generator.py:394:60
+ --> core/llm_generator/llm_generator.py:380:60
ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[SystemPromptMessage | UserPromptMessage], model_parameters=dict[str, float], stream=Literal[False]) [no-matching-overload]
- --> core/llm_generator/llm_generator.py:582:60
+ --> core/llm_generator/llm_generator.py:568:60
+ERROR Object of class `tuple` has no attribute `delta` [missing-attribute]
+ --> core/llm_generator/output_parser/structured_output.py:186:27
+ERROR Object of class `NoneType` has no attribute `initialize` [missing-attribute]
+ --> core/mcp/mcp_client.py:90:9
ERROR Argument `dict[str, list[str] | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
- --> core/ops/mlflow_trace/mlflow_trace.py:271:24
+ --> core/ops/mlflow_trace/mlflow_trace.py:270:24
ERROR Argument `dict[str, dict[str, Any] | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
- --> core/ops/mlflow_trace/mlflow_trace.py:335:24
+ --> core/ops/mlflow_trace/mlflow_trace.py:334:24
ERROR Argument `dict[str, dict[str, Any] | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
- --> core/ops/mlflow_trace/mlflow_trace.py:372:24
+ --> core/ops/mlflow_trace/mlflow_trace.py:371:24
ERROR Argument `dict[str, dict[str, Any] | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
- --> core/ops/mlflow_trace/mlflow_trace.py:396:24
+ --> core/ops/mlflow_trace/mlflow_trace.py:395:24
ERROR Argument `dict[str, int | str | None]` is not assignable to parameter `attributes` with type `dict[str, str] | None` in function `mlflow.tracing.fluent.start_span_no_context` [bad-argument-type]
- --> core/ops/mlflow_trace/mlflow_trace.py:415:24
-ERROR Class member `OpsTraceProviderConfigMap.__getitem__` overrides parent class `UserDict` in an inconsistent manner [bad-param-name-override]
- --> core/ops/ops_trace_manager.py:206:9
+ --> core/ops/mlflow_trace/mlflow_trace.py:414:24
+ERROR Object of class `dict` has no attribute `model_dump` [missing-attribute]
+ --> core/ops/ops_trace_manager.py:990:32
ERROR Runtime checkable protocol `Generator` has an unsafe overlap with type `BaseModel | Generator[BaseModel | Mapping[Unknown, Unknown] | str] | Mapping[Unknown, Unknown]` [unsafe-overlap]
- --> core/plugin/backwards_invocation/base.py:9:33
+ --> core/plugin/backwards_invocation/base.py:10:33
+ERROR Object of class `tuple` has no attribute `delta` [missing-attribute]
+ --> core/plugin/backwards_invocation/model.py:65:24
+ERROR Object of class `tuple` has no attribute `delta` [missing-attribute]
+ --> core/plugin/backwards_invocation/model.py:66:100
+ERROR Object of class `tuple` has no attribute `prompt_messages` [missing-attribute]
+ --> core/plugin/backwards_invocation/model.py:67:21
+ERROR Yielded type `tuple[str, Any] | Unknown` is not assignable to declared yield type `LLMResultChunk` [invalid-yield]
+ --> core/plugin/backwards_invocation/model.py:68:27
+ERROR Runtime checkable protocol `Generator` has an unsafe overlap with type `Generator[LLMResultChunkWithStructuredOutput] | LLMResultWithStructuredOutput` [unsafe-overlap]
+ --> core/plugin/backwards_invocation/model.py:122:33
+ERROR Object of class `tuple` has no attribute `delta` [missing-attribute]
+ --> core/plugin/backwards_invocation/model.py:126:24
+ERROR Object of class `tuple` has no attribute `delta` [missing-attribute]
+ --> core/plugin/backwards_invocation/model.py:127:100
+ERROR Object of class `tuple` has no attribute `prompt_messages` [missing-attribute]
+ --> core/plugin/backwards_invocation/model.py:128:21
+ERROR Yielded type `LLMResultChunkWithStructuredOutput | tuple[str, Any]` is not assignable to declared yield type `LLMResultChunkWithStructuredOutput` [invalid-yield]
+ --> core/plugin/backwards_invocation/model.py:129:27
+ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
+ --> core/prompt/utils/extract_thread_messages.py:11:5
ERROR Object of class `NoneType` has no attribute `data_source_type` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:142:36
+ --> core/rag/datasource/keyword/jieba/jieba.py:143:36
ERROR Object of class `NoneType` has no attribute `keyword_table` [missing-attribute]
- --> core/rag/datasource/keyword/jieba/jieba.py:144:13
+ --> core/rag/datasource/keyword/jieba/jieba.py:145:13
ERROR Cannot index into `set[Any]` [bad-index]
- --> core/rag/datasource/keyword/jieba/jieba.py:157:29
-ERROR Argument `object` is not assignable to parameter `iterable` with type `Iterable[@_]` in function `list.__init__` [bad-argument-type]
- --> core/rag/datasource/keyword/jieba/jieba_keyword_table_handler.py:88:35
+ --> core/rag/datasource/keyword/jieba/jieba.py:158:29
+ERROR No matching overload found for function `list.__init__` called with arguments: (object) [no-matching-overload]
+ --> core/rag/datasource/keyword/jieba/jieba_keyword_table_handler.py:88:34
ERROR Class member `AnalyticdbVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
--> core/rag/datasource/vdb/analyticdb/analyticdb_vector.py:43:9
-ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._create_namespace_request.CreateNamespaceRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:120:40
-ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._describe_collection_request.DescribeCollectionRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:141:40
-ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._upsert_collection_data_request.UpsertCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:187:32
-ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._query_collection_data_request.QueryCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:200:32
-ERROR Argument `None` is not assignable to parameter `vector` with type `list[float]` in function `alibabacloud_gpdb20160503.models._query_collection_data_request.QueryCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:204:20
-ERROR Argument `None` is not assignable to parameter `content` with type `str` in function `alibabacloud_gpdb20160503.models._query_collection_data_request.QueryCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:205:21
-ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._delete_collection_data_request.DeleteCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:221:32
-ERROR Argument `None` is not assignable to parameter `collection_data` with type `str` in function `alibabacloud_gpdb20160503.models._delete_collection_data_request.DeleteCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:223:29
-ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._delete_collection_data_request.DeleteCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:235:32
-ERROR Argument `None` is not assignable to parameter `collection_data` with type `str` in function `alibabacloud_gpdb20160503.models._delete_collection_data_request.DeleteCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:237:29
-ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._query_collection_data_request.QueryCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:256:32
-ERROR Argument `None` is not assignable to parameter `content` with type `str` in function `alibabacloud_gpdb20160503.models._query_collection_data_request.QueryCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:261:21
+ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models.CreateNamespaceRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:111:40
+ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models.DescribeCollectionRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:132:40
+ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models.UpsertCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:178:32
+ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models.QueryCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:191:32
+ERROR Argument `None` is not assignable to parameter `vector` with type `list[float]` in function `alibabacloud_gpdb20160503.models.QueryCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:195:20
+ERROR Argument `None` is not assignable to parameter `content` with type `str` in function `alibabacloud_gpdb20160503.models.QueryCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:196:21
+ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models.DeleteCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:212:32
+ERROR Argument `None` is not assignable to parameter `collection_data` with type `str` in function `alibabacloud_gpdb20160503.models.DeleteCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:214:29
+ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models.DeleteCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:226:32
+ERROR Argument `None` is not assignable to parameter `collection_data` with type `str` in function `alibabacloud_gpdb20160503.models.DeleteCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:228:29
+ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models.QueryCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:247:32
+ERROR Argument `None` is not assignable to parameter `content` with type `str` in function `alibabacloud_gpdb20160503.models.QueryCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:252:21
+ERROR Argument `str | None` is not assignable to parameter `s` with type `bytearray | bytes | str` in function `json.loads` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:260:39
ERROR Argument `str | None` is not assignable to parameter `page_content` with type `bytearray | bytes | str` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:272:34
-ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._query_collection_data_request.QueryCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:293:32
-ERROR Argument `None` is not assignable to parameter `vector` with type `list[float]` in function `alibabacloud_gpdb20160503.models._query_collection_data_request.QueryCollectionDataRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:297:20
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:263:34
+ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models.QueryCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:284:32
+ERROR Argument `None` is not assignable to parameter `vector` with type `list[float]` in function `alibabacloud_gpdb20160503.models.QueryCollectionDataRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:288:20
+ERROR Argument `str | None` is not assignable to parameter `s` with type `bytearray | bytes | str` in function `json.loads` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:297:39
ERROR Argument `str | None` is not assignable to parameter `page_content` with type `bytearray | bytes | str` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:309:34
-ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models._delete_collection_request.DeleteCollectionRequest.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:325:36
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:300:34
+ERROR Argument `str | None` is not assignable to parameter `namespace_password` with type `str` in function `alibabacloud_gpdb20160503.models.DeleteCollectionRequest.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/analyticdb/analyticdb_vector_openapi.py:316:36
ERROR Class member `BaiduVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
- --> core/rag/datasource/vdb/baidu/baidu_vector.py:99:9
+ --> core/rag/datasource/vdb/baidu/baidu_vector.py:90:9
+ERROR Object of class `FilteringIndex` has no attribute `state`
ERROR Expected a callable, got `None` [not-callable]
- --> core/rag/datasource/vdb/baidu/baidu_vector.py:149:15
+ --> core/rag/datasource/vdb/baidu/baidu_vector.py:152:15
+ERROR `json` is uninitialized [unbound-name]
+ --> core/rag/datasource/vdb/baidu/baidu_vector.py:190:25
ERROR Argument `list[Field]` is not assignable to parameter `fields` with type `list[dict[str, str]] | list[str]` in function `pymochow.model.schema.FilteringIndex.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/baidu/baidu_vector.py:303:28
+ --> core/rag/datasource/vdb/baidu/baidu_vector.py:297:28
+ERROR Type `None` is not iterable [not-iterable]
+ --> core/rag/datasource/vdb/couchbase/couchbase_vector.py:193:22
ERROR Expected 0 positional arguments, got 1 in function `couchbase.logic.search_queries.SearchQuery.__init__` [bad-argument-count]
--> core/rag/datasource/vdb/couchbase/couchbase_vector.py:309:77
+ERROR Type `None` is not iterable [not-iterable]
+ --> core/rag/datasource/vdb/couchbase/couchbase_vector.py:332:22
ERROR Unpacked keyword argument `bool | Unknown | None` is not assignable to parameter `host` with type `bytearray | bytes | str | None` in function `ElasticSearchConfig.__init__` [bad-argument-type]
--> core/rag/datasource/vdb/elasticsearch/elasticsearch_vector.py:355:40
ERROR Unpacked keyword argument `bool | Unknown | None` is not assignable to parameter `username` with type `bytearray | bytes | str | None` in function `ElasticSearchConfig.__init__` [bad-argument-type]
@@ -147,13 +218,15 @@
ERROR `None` is not subscriptable [unsupported-operation]
--> core/rag/datasource/vdb/lindorm/lindorm_vector.py:392:30
ERROR Cannot index into `Coroutine[Unknown, Unknown, Unknown]` [bad-index]
- --> core/rag/datasource/vdb/milvus/milvus_vector.py:96:50
+ --> core/rag/datasource/vdb/milvus/milvus_vector.py:86:50
ERROR Argument `dict[Unknown, Unknown] | str` is not assignable to parameter `version` with type `str` in function `packaging.version.parse` [bad-argument-type]
- --> core/rag/datasource/vdb/milvus/milvus_vector.py:114:34
+ --> core/rag/datasource/vdb/milvus/milvus_vector.py:104:34
+ERROR Expected argument after ** to be a mapping, got: dict[Unknown, Unknown] | None in function `pymilvus.milvus_client.index.IndexParams.add_index` [bad-unpacking]
+ --> core/rag/datasource/vdb/milvus/milvus_vector.py:355:71
ERROR Argument `Literal['HNSW']` is not assignable to parameter `index_type` with type `VecIndexType` in function `pyobvector.client.index_param.IndexParams.add_index` [bad-argument-type]
- --> core/rag/datasource/vdb/oceanbase/oceanbase_vector.py:160:28
+ --> core/rag/datasource/vdb/oceanbase/oceanbase_vector.py:159:28
ERROR Class member `OceanBaseVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
- --> core/rag/datasource/vdb/oceanbase/oceanbase_vector.py:240:9
+ --> core/rag/datasource/vdb/oceanbase/oceanbase_vector.py:239:9
ERROR `tuple[Never, Never]` is not assignable to TypedDict key `http_auth` with type `type[Urllib3HttpConnection] | bool | int | list[dict[str, int | str]]` [bad-typed-dict-key]
--> core/rag/datasource/vdb/opensearch/opensearch_vector.py:72:35
ERROR Class member `OpenSearchVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
@@ -164,143 +237,276 @@
--> core/rag/datasource/vdb/oracle/oraclevector.py:139:31
ERROR Function declared to return `bool`, but one or more paths are missing an explicit `return` [bad-return]
--> core/rag/datasource/vdb/oracle/oraclevector.py:191:39
-ERROR No matching overload found for function `sqlalchemy.sql.sqltypes.UUID.__init__` called with arguments: (as_uuid=Literal[True]) [no-matching-overload]
- --> core/rag/datasource/vdb/pgvecto_rs/pgvecto_rs.py:67:32
+ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 2) into 3 values [bad-unpacking]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:107:9
+ERROR Cannot unpack list[Unknown] | tuple[CapacityUnit | None, Row | None] | tuple[CapacityUnit | None, Row | None, Unknown] | tuple[CapacityUnit | None, list[Unknown] | Unknown | None, list[Unknown], Unknown] | tuple[SearchIndexMeta, SyncStat | None] | tuple[list[Unknown], list[Unknown], list[Unknown]] | tuple[Unknown, ...] | tuple[*tuple[Unknown, ...]] (of size 4) into 3 values [bad-unpacking]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:107:9
+ERROR `in` is not supported between `str` and `DeleteTimeseriesMetaResponse` [not-iterable]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:159:12
+ERROR `in` is not supported between `str` and `DescribeTableResponse` [not-iterable]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:159:12
+ERROR `in` is not supported between `str` and `DescribeTimeseriesTableResponse` [not-iterable]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:159:12
+ERROR `in` is not supported between `str` and `GetTimeseriesDataResponse` [not-iterable]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:159:12
+ERROR `in` is not supported between `str` and `PutTimeseriesDataResponse` [not-iterable]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:159:12
+ERROR `in` is not supported between `str` and `QueryTimeseriesMetaResponse` [not-iterable]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:159:12
+ERROR `in` is not supported between `str` and `UpdateTableResponse` [not-iterable]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:159:12
+ERROR `in` is not supported between `str` and `UpdateTimeseriesMetaResponse` [not-iterable]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:159:12
+ERROR `in` is not supported between `str` and `None` [not-iterable]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:159:12
+ERROR Cannot index into `CapacityUnit` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:173:33
+ERROR Cannot index into `Row` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:173:33
+ERROR Cannot index into `SearchIndexMeta` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:173:33
+ERROR Cannot index into `SyncStat` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:173:33
+ERROR `None` is not subscriptable [unsupported-operation]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:173:33
+ERROR Cannot index into `CapacityUnit` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:218:57
+ERROR Cannot index into `Row` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:218:57
+ERROR Cannot index into `SearchIndexMeta` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:218:57
+ERROR Cannot index into `SyncStat` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:218:57
+ERROR `None` is not subscriptable [unsupported-operation]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:218:57
+ERROR Cannot index into `CapacityUnit` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:218:72
+ERROR Cannot index into `Row` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:218:72
+ERROR Cannot index into `SearchIndexMeta` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:218:72
+ERROR Cannot index into `SyncStat` [bad-index]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:218:72
+ERROR `None` is not subscriptable [unsupported-operation]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:218:72
+ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `object | Unknown | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
+ --> core/rag/datasource/vdb/tablestore/tablestore_vector.py:260:9
+ERROR Object of class `ComputeSplitsResponse` has no attribute `rows`
+ERROR Object of class `ComputeSplitsResponse` has no attribute `next_token`
+ERROR Object of class `ComputeSplitsResponse` has no attribute `search_hits`
+ERROR Object of class `ComputeSplitsResponse` has no attribute `search_hits`
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.describe_collection` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:82:35
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:68:35
ERROR Object of class `FilterIndex` has no attribute `dimension`
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.create_database_if_not_exists` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:94:73
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:80:73
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.exists_collection` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:109:31
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:91:31
ERROR Argument `SparseIndex` is not assignable to parameter `object` with type `FilterIndex | VectorIndex` in function `list.append` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:154:32
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:136:32
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.create_collection` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:157:35
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:139:35
ERROR Argument `list[FilterIndex | VectorIndex]` is not assignable to parameter `indexes` with type `list[IndexField]` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.create_collection` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:162:29
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:144:29
ERROR Argument `SparseIndex` is not assignable to parameter `object` with type `FilterIndex | VectorIndex` in function `list.append` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:173:36
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:155:36
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.create_collection` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:175:35
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:157:35
ERROR Argument `list[FilterIndex | VectorIndex]` is not assignable to parameter `indexes` with type `list[IndexField]` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.create_collection` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:180:29
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:162:29
ERROR Class member `TencentVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:188:9
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:170:9
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.upsert` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:212:31
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:194:31
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.query` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:220:27
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:202:27
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.delete` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:240:31
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:222:31
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.delete` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:245:27
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:227:27
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.search` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:256:27
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:238:27
ERROR Argument `Filter | None` is not assignable to parameter `filter` with type `Filter | str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.search` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:259:20
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:241:20
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.hybrid_search` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:276:27
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:258:27
ERROR Argument `list[list[float | int]] | list[list[list[float | int]]]` is not assignable to parameter `data` with type `list[list[float | int]] | None` in function `tcvectordb.model.document.KeywordSearch.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:287:26
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:269:26
ERROR Argument `Filter | None` is not assignable to parameter `filter` with type `Filter | str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.hybrid_search` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:296:20
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:278:20
ERROR Argument `str | None` is not assignable to parameter `database_name` with type `str` in function `tcvectordb.rpc.client.stub.RPCVectorDBClient.drop_collection` [bad-argument-type]
- --> core/rag/datasource/vdb/tencent/tencent_vector.py:320:31
-ERROR Unpacked keyword argument `str | Unknown` is not assignable to parameter `port` with type `int | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:87:51
-ERROR Unpacked keyword argument `str | Unknown` is not assignable to parameter `grpc_port` with type `int` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:87:51
-ERROR Unpacked keyword argument `str | Unknown` is not assignable to parameter `prefer_grpc` with type `bool` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:87:51
-ERROR Unpacked keyword argument `str | Unknown` is not assignable to parameter `https` with type `bool | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:87:51
-ERROR Unpacked keyword argument `str | Unknown` is not assignable to parameter `timeout` with type `int | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:87:51
-ERROR Unpacked keyword argument `str | Unknown` is not assignable to parameter `force_disable_check_same_thread` with type `bool` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:87:51
-ERROR Unpacked keyword argument `str | Unknown` is not assignable to parameter `grpc_options` with type `dict[str, Any] | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:87:51
-ERROR Unpacked keyword argument `str | Unknown` is not assignable to parameter `auth_token_provider` with type `(() -> Awaitable[str]) | (() -> str) | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:87:51
-ERROR `None` is not subscriptable [unsupported-operation]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:453:40
-ERROR `None` is not subscriptable [unsupported-operation]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:454:42
+ --> core/rag/datasource/vdb/tencent/tencent_vector.py:305:31
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `location` with type `str | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `url` with type `str | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `port` with type `int | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `grpc_port` with type `int` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `prefer_grpc` with type `bool` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `https` with type `bool | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `api_key` with type `str | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `prefix` with type `str | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `timeout` with type `int | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `host` with type `str | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `path` with type `str | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `force_disable_check_same_thread` with type `bool` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `grpc_options` with type `dict[str, Any] | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR Unpacked keyword argument `bool | float | int | str | None` is not assignable to parameter `auth_token_provider` with type `(() -> Awaitable[str]) | (() -> str) | None` in function `qdrant_client.qdrant_client.QdrantClient.__init__` [bad-argument-type]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:86:51
+ERROR `None` is not subscriptable [unsupported-operation]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:447:40
+ERROR `None` is not subscriptable [unsupported-operation]
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:448:42
ERROR `None` is not subscriptable [unsupported-operation]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:455:37
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:449:37
ERROR `None` is not subscriptable [unsupported-operation]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:456:38
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_on_qdrant_vector.py:450:38
ERROR `None` is not subscriptable [unsupported-operation]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:71:20
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:61:20
ERROR `None` is not subscriptable [unsupported-operation]
- --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:72:35
+ --> core/rag/datasource/vdb/tidb_on_qdrant/tidb_service.py:62:35
ERROR Class member `UpstashVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
--> core/rag/datasource/vdb/upstash/upstash_vector.py:47:9
ERROR Class member `VikingDBVector.add_texts` overrides parent class `BaseVector` in an inconsistent manner [bad-override]
- --> core/rag/datasource/vdb/vikingdb/vikingdb_vector.py:117:9
+ --> core/rag/datasource/vdb/vikingdb/vikingdb_vector.py:116:9
ERROR Object of class `list` has no attribute `fields` [missing-attribute]
- --> core/rag/datasource/vdb/vikingdb/vikingdb_vector.py:144:55
+ --> core/rag/datasource/vdb/vikingdb/vikingdb_vector.py:143:55
ERROR Class member `WeaviateVector._get_uuids` overrides parent class `BaseVector` in an inconsistent manner [bad-param-name-override]
- --> core/rag/datasource/vdb/weaviate/weaviate_vector.py:272:9
-ERROR Argument `GeoCoordinate | Mapping[str, WeaviateField] | PhoneNumber | Sequence[Mapping[str, WeaviateField]] | Sequence[UUID] | Sequence[bool] | Sequence[datetime] | Sequence[float] | Sequence[int] | Sequence[str] | UUID | _PhoneNumber | bool | datetime | float | int | str | None` is not assignable to parameter `page_content` with type `bytearray | bytes | str` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/weaviate/weaviate_vector.py:425:51
-ERROR Argument `GeoCoordinate | Mapping[str, WeaviateField] | PhoneNumber | Sequence[Mapping[str, WeaviateField]] | Sequence[UUID] | Sequence[bool] | Sequence[datetime] | Sequence[float] | Sequence[int] | Sequence[str] | UUID | _PhoneNumber | bool | datetime | float | int | str | None` is not assignable to parameter `page_content` with type `bytearray | bytes | str` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/weaviate/weaviate_vector.py:467:47
-ERROR Argument `list[float] | list[list[float]] | None` is not assignable to parameter `vector` with type `Iterable[LaxFloat] | None` in function `core.rag.models.document.Document.__init__` [bad-argument-type]
- --> core/rag/datasource/vdb/weaviate/weaviate_vector.py:467:60
-ERROR `upload_file` may be uninitialized [unbound-name]
- --> core/rag/extractor/extract_processor.py:116:61
-ERROR `upload_file` may be uninitialized [unbound-name]
- --> core/rag/extractor/extract_processor.py:126:62
-ERROR `upload_file` may be uninitialized [unbound-name]
- --> core/rag/extractor/extract_processor.py:152:61
-ERROR `upload_file` may be uninitialized [unbound-name]
- --> core/rag/extractor/extract_processor.py:158:62
+ --> core/rag/datasource/vdb/weaviate/weaviate_vector.py:268:9
ERROR `response` may be uninitialized [unbound-name]
- --> core/rag/extractor/firecrawl/firecrawl_app.py:183:16
+ --> core/rag/extractor/firecrawl/firecrawl_app.py:158:16
ERROR `response` may be uninitialized [unbound-name]
- --> core/rag/extractor/firecrawl/firecrawl_app.py:192:16
+ --> core/rag/extractor/firecrawl/firecrawl_app.py:167:16
ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._api.post` [bad-argument-type]
- --> core/rag/extractor/notion_extractor.py:106:25
+ --> core/rag/extractor/notion_extractor.py:105:25
ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._api.request` [bad-argument-type]
- --> core/rag/extractor/notion_extractor.py:175:29
+ --> core/rag/extractor/notion_extractor.py:174:29
ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._api.request` [bad-argument-type]
- --> core/rag/extractor/notion_extractor.py:237:25
+ --> core/rag/extractor/notion_extractor.py:236:25
ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._api.request` [bad-argument-type]
- --> core/rag/extractor/notion_extractor.py:297:25
+ --> core/rag/extractor/notion_extractor.py:296:25
ERROR Argument `dict[str, bytes | str]` is not assignable to parameter `headers` with type `Headers | Mapping[bytes, bytes] | Mapping[str, str] | Sequence[tuple[bytes, bytes]] | Sequence[tuple[str, str]] | None` in function `httpx._api.request` [bad-argument-type]
- --> core/rag/extractor/notion_extractor.py:371:21
-ERROR Argument `Unknown | None` is not assignable to parameter `result_object` with type `dict[str, Any]` in function `WaterCrawlProvider._structure_data` [bad-argument-type]
- --> core/rag/extractor/watercrawl/provider.py:108:37
+ --> core/rag/extractor/notion_extractor.py:368:21
+ERROR Cannot index into `Generator[Unknown]` [bad-index]
+ --> core/rag/extractor/watercrawl/client.py:210:54
+ERROR Cannot index into `bytes` [bad-index]
+ --> core/rag/extractor/watercrawl/client.py:210:54
+ERROR Cannot index into `list[Unknown]` [bad-index]
+ --> core/rag/extractor/watercrawl/client.py:210:54
+ERROR `None` is not subscriptable [unsupported-operation]
+ --> core/rag/extractor/watercrawl/client.py:210:54
+ERROR Object of class `Generator` has no attribute `get`
+ERROR Cannot index into `Generator[Unknown]` [bad-index]
+ --> core/rag/extractor/watercrawl/provider.py:70:12
+ERROR Cannot index into `bytes` [bad-index]
+ --> core/rag/extractor/watercrawl/provider.py:70:12
+ERROR Cannot index into `list[Unknown]` [bad-index]
+ --> core/rag/extractor/watercrawl/provider.py:70:12
+ERROR `None` is not subscriptable [unsupported-operation]
+ --> core/rag/extractor/watercrawl/provider.py:70:12
+ERROR Object of class `Generator` has no attribute `get`
+ERROR Object of class `Generator` has no attribute `get`
+ERROR Object of class `Generator` has no attribute `get`
+ERROR Object of class `Generator` has no attribute `get`
+ERROR Argument `Generator[Unknown] | bytes | dict[Unknown, Unknown] | list[Unknown] | Unknown | None` is not assignable to parameter `result_object` with type `dict[str, Any]` in function `WaterCrawlProvider._structure_data` [bad-argument-type]
+ --> core/rag/extractor/watercrawl/provider.py:110:37
+ERROR Cannot index into `Generator[Unknown]` [bad-index]
+ --> core/rag/extractor/watercrawl/provider.py:135:20
+ERROR Cannot index into `bytes` [bad-index]
+ --> core/rag/extractor/watercrawl/provider.py:135:20
+ERROR Cannot index into `list[Unknown]` [bad-index]
+ --> core/rag/extractor/watercrawl/provider.py:135:20
+ERROR `None` is not subscriptable [unsupported-operation]
+ --> core/rag/extractor/watercrawl/provider.py:135:20
+ERROR Cannot index into `Generator[Unknown]` [bad-index]
+ --> core/rag/extractor/watercrawl/provider.py:141:16
+ERROR Cannot index into `bytes` [bad-index]
+ --> core/rag/extractor/watercrawl/provider.py:141:16
+ERROR Cannot index into `list[Unknown]` [bad-index]
+ --> core/rag/extractor/watercrawl/provider.py:141:16
+ERROR `None` is not subscriptable [unsupported-operation]
+ --> core/rag/extractor/watercrawl/provider.py:141:16
+ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
+ --> core/rag/extractor/word_extractor.py:372:13
+ERROR Pyrefly detected conflicting types while breaking a dependency cycle: `str | Any | None` is not assignable to `None`. Adding explicit type annotations might possibly help. [bad-assignment]
+ --> core/rag/extractor/word_extractor.py:393:25
ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
--> core/rag/extractor/word_extractor.py:426:24
ERROR Object of class `Document` has no attribute `score` [missing-attribute]
- --> core/rag/index_processor/processor/paragraph_index_processor.py:198:33
+ --> core/rag/index_processor/processor/paragraph_index_processor.py:194:33
ERROR Object of class `Document` has no attribute `score` [missing-attribute]
- --> core/rag/index_processor/processor/paragraph_index_processor.py:199:16
+ --> core/rag/index_processor/processor/paragraph_index_processor.py:195:16
ERROR Object of class `Document` has no attribute `score` [missing-attribute]
- --> core/rag/index_processor/processor/parent_child_index_processor.py:239:33
+ --> core/rag/index_processor/processor/parent_child_index_processor.py:234:33
ERROR Object of class `Document` has no attribute `score` [missing-attribute]
- --> core/rag/index_processor/processor/parent_child_index_processor.py:240:16
+ --> core/rag/index_processor/processor/parent_child_index_processor.py:235:16
ERROR Object of class `Document` has no attribute `score` [missing-attribute]
--> core/rag/index_processor/processor/qa_index_processor.py:204:33
ERROR Object of class `Document` has no attribute `score` [missing-attribute]
--> core/rag/index_processor/processor/qa_index_processor.py:205:16
ERROR No matching overload found for function `core.model_manager.ModelInstance.invoke_llm` called with arguments: (prompt_messages=list[SystemPromptMessage | UserPromptMessage], tools=list[PromptMessageTool], stream=Literal[False], model_parameters=dict[str, float | int]) [no-matching-overload]
- --> core/rag/retrieval/router/multi_dataset_function_call_router.py:32:58
+ --> core/rag/retrieval/router/multi_dataset_function_call_router.py:31:58
+ERROR Argument `Dataset | None` is not assignable to parameter `dataset` with type `Dataset` in function `services.summary_index_service.SummaryIndexService.generate_and_vectorize_summary` [bad-argument-type]
+ --> core/rag/summary_index/summary_index.py:79:85
+ERROR Yielded type `Generator[ToolInvokeMessage] | ToolInvokeMessage | list[ToolInvokeMessage]` is not assignable to declared yield type `ToolInvokeMessage` [invalid-yield]
+ --> core/tools/__base/tool.py:72:23
+ERROR yield from value must be iterable, got `Generator[ToolInvokeMessage] | ToolInvokeMessage | list[ToolInvokeMessage]` [invalid-yield]
+ --> core/tools/__base/tool.py:78:17
ERROR Class member `MCPToolProviderController.entity` overrides parent class `ToolProviderController` in an inconsistent manner [bad-override]
--> core/tools/mcp_tool/provider.py:33:14
ERROR Class member `PluginToolProviderController.entity` overrides parent class `BuiltinToolProviderController` in an inconsistent manner [bad-override]
--> core/tools/plugin_tool/provider.py:12:5
+ERROR `dict[Unknown, Unknown] | float | list[Unknown] | str | Unknown` is not assignable to attribute `json_object` with type `dict[Unknown, Unknown] | list[Unknown]` [bad-assignment]
+ --> core/tools/utils/message_transformer.py:163:51
ERROR `(method: str, url: str, max_retries: int = ..., **kwargs: Any) -> httpx._models.Response` is not assignable to attribute `perform_request` with type `(self: CloudScraper, method: Unknown, url: Unknown, *args: Unknown, **kwargs: Unknown) -> requests.models.Response` [bad-assignment]
--> core/tools/utils/web_reader_tool.py:66:35
ERROR `list[Never]` is not assignable to attribute `tools` with type `Never` [bad-assignment]
--> core/tools/workflow_as_tool/provider.py:237:26
-ERROR Returned type `dict[object, str]` is not assignable to declared return type `dict[str, Any] | None` [bad-return]
- --> core/workflow/human_input_compat.py:183:16
-ERROR No matching overload found for function `redis.client.Redis.__init__` called with arguments: (connection_pool=ConnectionPool) [no-matching-overload]
- --> extensions/ext_redis.py:244:38
+ERROR `data` may be uninitialized [unbound-name]
+ --> dify_graph/file/file_manager.py:116:29
+ERROR `reason` may be uninitialized [unbound-name]
+ --> dify_graph/graph_engine/layers/execution_limits.py:137:61
+ERROR `reason` may be uninitialized [unbound-name]
+ --> dify_graph/graph_engine/layers/execution_limits.py:141:81
+ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missin\n\n... (truncated) ... |
|
i think we can rename events package to message_event package |
Important
Fixes #<issue number>.Summary
Fixes #33818.
This PR fixes an import collision between Dify's local
eventspackage andopensearch-py.When OpenSearch support is imported inside Dify's
apipackage, Python resolveseventsto Dify's local
api/eventspackage instead of the third-partyEventslibrary expectedby
opensearch-py, which causes:ImportError: cannot import name 'Events' from 'events'This change adds a minimal compatibility
Eventsimplementation inapi/events/__init__.pyand includes regression tests to verify that importing
OpenSearchworks correctly in thepresence of Dify's local
eventspackage.Screenshots
N/A (backend-only fix, no UI changes)
Checklist
make lintandmake type-check(backend) andcd web && npx lint-staged(frontend) to appease the lint gods