refactor: add missing @override decorator to remaining MCP, Jieba, embeddings, and misc subclasses#36528
Merged
asukaminato0721 merged 1 commit intoMay 22, 2026
Conversation
…beddings, and misc subclasses Relates to langgenius#36406. Adds @OverRide (26 decorators across 9 files) to the remaining subclass methods flagged by pyrefly's missing-override-decorator check: - MCPClientWithAuthRetry: __enter__, list_tools, invoke_tool - ClientSession: send_progress_notification, _received_request, _handle_incoming, _received_notification - Jieba (BaseKeyword): create, add_texts, text_exists, delete_by_ids, search, delete - _LazyEmbeddings (Embeddings): embed_documents, embed_multimodal_documents, embed_query, embed_multimodal_query, aembed_documents, aembed_query - ApiExternalDataTool: validate_config, query - NoopDraftVariableSaver.save - WorkflowRunStatusField.output, WorkflowRunOutputsField.output (flask_restx fields.Raw subclasses) - PluginDaemonError.__str__ (Exception subclass) - ProviderConfigurations.__iter__ (pydantic BaseModel subclass) @OverRide is placed below @property/@classmethod per the established pattern. Uses 'from typing import override' (Python 3.12+ stdlib) per the pattern established in langgenius#36486.
Contributor
Pyrefly Type Coverage
|
asukaminato0721
approved these changes
May 22, 2026
Contributor
|
You can add the flag to true after this pr. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to #36406.
Adds
@override(PEP 698,from typing import override) to the remaining 26 subclass method overrides flagged by pyrefly's missing-override-decorator check, across 9 files:MCP client and session:
MCPClientWithAuthRetry:__enter__,list_tools,invoke_tool(api/core/mcp/auth_client.py)ClientSession:send_progress_notification,_received_request,_handle_incoming,_received_notification(api/core/mcp/session/client_session.py)RAG keyword and vector backends:
Jieba(BaseKeyword subclass):create,add_texts,text_exists,delete_by_ids,search,delete(api/core/rag/datasource/keyword/jieba/jieba.py)_LazyEmbeddings(Embeddings subclass):embed_documents,embed_multimodal_documents,embed_query,embed_multimodal_query,aembed_documents,aembed_query(api/core/rag/datasource/vdb/vector_factory.py)External data tool:
ApiExternalDataTool:validate_config,query(api/core/external_data_tool/api/api.py)Draft variable saver:
NoopDraftVariableSaver.save(api/core/app/apps/draft_variable_saver.py)Service API workflow fields (flask_restx
fields.Rawsubclasses):WorkflowRunStatusField.output,WorkflowRunOutputsField.output(api/controllers/service_api/app/workflow.py)Plugin daemon exception:
PluginDaemonError.__str__(api/core/plugin/impl/exc.py)Provider configurations (pydantic
BaseModelsubclass):ProviderConfigurations.__iter__(api/core/entities/provider_configuration.py)@overrideis placed below@property/@classmethodper the PEP 698 convention. Pattern follows the merged example in #36425 and all previous merged slices (#36486, #36490, #36491, #36492, #36493, #36494, #36495, #36496, #36511).This closes out the remaining
missing-override-decoratorerrors from the issue body that hadn't already been covered by previous slices, so #36406 should be fully resolved after this PR lands.