Skip to content

refactor: remove unused Flask-RESTX field dicts from end_user and conversation_variable fields (#28015)#36929

Merged
fatelei merged 1 commit into
langgenius:mainfrom
EvanYao826:refactor/28015-remove-unused-flask-restx-fields
Jun 2, 2026
Merged

refactor: remove unused Flask-RESTX field dicts from end_user and conversation_variable fields (#28015)#36929
fatelei merged 1 commit into
langgenius:mainfrom
EvanYao826:refactor/28015-remove-unused-flask-restx-fields

Conversation

@EvanYao826
Copy link
Copy Markdown
Contributor

Summary

Removes legacy Flask-RESTX field dictionaries that have been fully replaced by Pydantic BaseModel equivalents.

Related to #28015

Changes

api/fields/end_user_fields.py (-21 lines)

  • Remove simple_end_user_fields dict (no external references)
  • Remove end_user_detail_fields dict (no external references)
  • Remove flask_restx import (no longer needed)

api/fields/conversation_variable_fields.py (-31 lines)

  • Remove paginated_conversation_variable_fields dict (no external references)
  • Remove conversation_variable_infinite_scroll_pagination_fields dict (no external references)
  • Remove build_conversation_variable_model() function (no external references)
  • Remove build_conversation_variable_infinite_scroll_pagination_model() function (no external references)
  • Remove Namespace import (only used by removed builder functions)

Kept: conversation_variable_fields dict — still imported by workflow_fields.py and trial.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"
  • Ruff lint passed ✓
  • lint-staged passed on commit ✓

…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.
@EvanYao826 EvanYao826 requested a review from QuantumGhost as a code owner June 2, 2026 06:38
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. refactor labels Jun 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 46.02% 46.02% -0.00%
Strict coverage 45.52% 45.52% -0.00%
Typed symbols 24,986 24,984 -2
Untyped symbols 29,631 29,629 -2
Modules 2790 2790 0

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jun 2, 2026
@fatelei fatelei added this pull request to the merge queue Jun 2, 2026
Merged via the queue into langgenius:main with commit 3cd0da3 Jun 2, 2026
31 checks passed
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:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants