Skip to content

refactor: convert isinstance chains to match/case (part 5)#36298

Merged
asukaminato0721 merged 7 commits into
langgenius:mainfrom
EvanYao826:refactor/isinstance-match-case-5
May 18, 2026
Merged

refactor: convert isinstance chains to match/case (part 5)#36298
asukaminato0721 merged 7 commits into
langgenius:mainfrom
EvanYao826:refactor/isinstance-match-case-5

Conversation

@EvanYao826
Copy link
Copy Markdown
Contributor

Summary

Continue the isinstance → match/case refactoring from #35902.

Converted 14 if/elif isinstance chains across 6 files to Python 3.10+ match/case statements.

Files Changed

File Chains
api/core/workflow/node_runtime.py 2
api/core/llm_generator/output_parser/structured_output.py 3
api/core/app/workflow/layers/persistence.py 1
api/libs/helper.py 2
api/core/app/apps/base_app_generator.py 2
api/models/utils/file_input_compat.py 3

Previous PRs

Related

Relates to #35902

@EvanYao826 EvanYao826 requested a review from QuantumGhost as a code owner May 18, 2026 04:57
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. refactor labels May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 0.00% 43.69% +43.69%
Strict coverage 0.00% 43.22% +43.22%
Typed symbols 0 22,134 +22,134
Untyped symbols 0 28,840 +28,840
Modules 0 2558 +2,558

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 18, 2026
@asukaminato0721 asukaminato0721 enabled auto-merge May 18, 2026 07:06
@asukaminato0721 asukaminato0721 added this pull request to the merge queue May 18, 2026
Merged via the queue into langgenius:main with commit 7e81472 May 18, 2026
27 checks passed
zhangtaodemama added a commit to zhangtaodemama/langgenius-dify-bfaadcb0c706 that referenced this pull request May 18, 2026
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:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants