refactor: remove unused Flask-RESTX field dicts from end_user and conversation_variable fields (#28015)#36929
Merged
fatelei merged 1 commit intoJun 2, 2026
Conversation
…versation_variable fields (langgenius#28015) Remove legacy Flask-RESTX field dictionaries that have been fully replaced by Pydantic BaseModel equivalents: - end_user_fields.py: remove simple_end_user_fields, end_user_detail_fields and flask_restx import (no external references) - conversation_variable_fields.py: remove paginated_conversation_variable_fields, conversation_variable_infinite_scroll_pagination_fields, and two unused builder functions (build_conversation_variable_model, build_conversation_variable_infinite_scroll_pagination_model) The core conversation_variable_fields dict is kept as it is still imported by workflow_fields.py and trial.py.
Contributor
Pyrefly Type Coverage
|
fatelei
approved these changes
Jun 2, 2026
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.
Summary
Removes legacy Flask-RESTX field dictionaries that have been fully replaced by Pydantic
BaseModelequivalents.Related to #28015
Changes
api/fields/end_user_fields.py(-21 lines)simple_end_user_fieldsdict (no external references)end_user_detail_fieldsdict (no external references)flask_restximport (no longer needed)api/fields/conversation_variable_fields.py(-31 lines)paginated_conversation_variable_fieldsdict (no external references)conversation_variable_infinite_scroll_pagination_fieldsdict (no external references)build_conversation_variable_model()function (no external references)build_conversation_variable_infinite_scroll_pagination_model()function (no external references)Namespaceimport (only used by removed builder functions)Kept:
conversation_variable_fieldsdict — still imported byworkflow_fields.pyandtrial.py.Verification
uv run python -c "from fields.end_user_fields import SimpleEndUser, EndUserDetail"✓uv run python -c "from fields.conversation_variable_fields import ConversationVariableResponse"✓uv run python -c "from fields.workflow_fields import conversation_variable_fields"✓