Skip to content

refactor: replace manual model_validate with @model_validate in explore/snippets controllers - #40241

Merged
asukaminato0721 merged 1 commit into
langgenius:mainfrom
likalikali:dep-inject-explore-snippets-mv
Aug 9, 2026
Merged

refactor: replace manual model_validate with @model_validate in explore/snippets controllers#40241
asukaminato0721 merged 1 commit into
langgenius:mainfrom
likalikali:dep-inject-explore-snippets-mv

Conversation

@likalikali

Copy link
Copy Markdown
Contributor

Replace manual model_validate(request.get_json()) calls with the @model_validate decorator in explore and snippets controller files.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. refactor labels Aug 9, 2026
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-08-09 05:41:19.308687139 +0000
+++ /tmp/pyrefly_pr.txt	2026-08-09 05:41:08.658630638 +0000
@@ -2075,7 +2075,7 @@
 ERROR Argument `Literal['account']` is not assignable to parameter `created_by_role` with type `CreatorUserRole` in function `models.model.UploadFile.__init__` [bad-argument-type]
     --> tests/unit_tests/controllers/console/datasets/test_datasets_segments.py:1102:29
 ERROR Object of class `FunctionType` has no attribute `assert_called_once_with` [missing-attribute]
-   --> tests/unit_tests/controllers/console/explore/test_trial.py:215:5
+   --> tests/unit_tests/controllers/console/explore/test_trial.py:216:5
 ERROR Argument `str` is not assignable to parameter `view` with type `(InstalledApp) -> str` in function `controllers.console.explore.wraps.decorator` [bad-argument-type]
   --> tests/unit_tests/controllers/console/explore/test_wraps.py:73:18
 ERROR Argument `str` is not assignable to parameter `view` with type `(InstalledApp) -> str` in function `controllers.console.explore.wraps.decorator` [bad-argument-type]

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 58.12% 58.13% +0.01%
Strict coverage 57.70% 57.71% +0.01%
Typed symbols 38,059 38,074 +15
Untyped symbols 27,625 27,625 0
Modules 3144 3144 0

@asukaminato0721
asukaminato0721 added this pull request to the merge queue Aug 9, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 9, 2026
Merged via the queue into langgenius:main with commit 925ca49 Aug 9, 2026
34 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:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants