Skip to content

refactor(services): replace Union with | syntax in service layer (batch 2)#34906

Merged
asukaminato0721 merged 2 commits intolanggenius:mainfrom
corevibe555:refactor/services-replace-union-batch-2
Apr 10, 2026
Merged

refactor(services): replace Union with | syntax in service layer (batch 2)#34906
asukaminato0721 merged 2 commits intolanggenius:mainfrom
corevibe555:refactor/services-replace-union-batch-2

Conversation

@corevibe555
Copy link
Copy Markdown
Contributor

Summary

  • Replace Union[Account, EndUser] with Account | EndUser in async_workflow_service.py (2 occurrences)
  • Replace Union[dict, ToolProviderApiEntity, PluginDatasourceProviderEntity] with | syntax in tools_transform_service.py
  • Replace Union[Account, EndUser] with Account | EndUser in rag_pipeline.py
  • Remove unused Union imports from all three files

Why this change

Python 3.10+ X | Y syntax supersedes Union[X, Y]. The rest of the codebase already uses | — these were leftovers in the service layer.

Changes

  • services/async_workflow_service.py: Replace Union with |, remove unused import
  • services/tools/tools_transform_service.py: Replace Union with |, remove unused import
  • services/rag_pipeline/rag_pipeline.py: Replace Union with |, remove unused import

Test plan

  • basedpyright passes
  • ruff check passes

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. refactor labels Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

No changes detected.

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

No changes detected.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 10, 2026
@asukaminato0721 asukaminato0721 added this pull request to the merge queue Apr 10, 2026
Merged via the queue into langgenius:main with commit 488fcd4 Apr 10, 2026
27 checks passed
HanqingZ pushed a commit to HanqingZ/dify that referenced this pull request Apr 23, 2026
…ch 2) (langgenius#34906)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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