Skip to content

refactor: replace manual model_validate with @model_validate in workspace remaining controllers - #40239

Queued
likalikali wants to merge 2 commits into
langgenius:mainfrom
likalikali:dep-inject-workspace-rest-mv
Queued

refactor: replace manual model_validate with @model_validate in workspace remaining controllers#40239
likalikali wants to merge 2 commits into
langgenius:mainfrom
likalikali:dep-inject-workspace-rest-mv

Conversation

@likalikali

Copy link
Copy Markdown
Contributor

Replace manual model_validate(request.get_json()) calls with the @model_validate decorator in remaining workspace controller files.

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

Copy link
Copy Markdown
Contributor

conflict

@likalikali
likalikali force-pushed the dep-inject-workspace-rest-mv branch from 4bae982 to c717762 Compare August 9, 2026 07:45
@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 07:50:53.673177460 +0000
+++ /tmp/pyrefly_pr.txt	2026-08-09 07:50:42.000080186 +0000
@@ -2122,16 +2122,20 @@
    --> tests/unit_tests/controllers/console/test_wraps.py:378:41
 ERROR Argument `Literal['app']` is not assignable to parameter `resource_type` with type `RBACResourceScope` in function `controllers.common.wraps._extract_resource_id` [bad-argument-type]
    --> tests/unit_tests/controllers/console/test_wraps.py:386:41
+ERROR Argument value `Literal[0]` violates Pydantic `ge` constraint `Literal[1]` for field `page` [bad-argument-type]
+   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:185:47
+ERROR Missing argument `plugin_id` in function `controllers.console.workspace.endpoint.EndpointListForPluginQuery.__init__` [missing-argument]
+   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:214:55
 ERROR Missing argument `name` in function `controllers.console.workspace.endpoint.EndpointUpdatePayload.__init__` [missing-argument]
-   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:282:50
+   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:284:50
 ERROR Missing argument `endpoint_id` in function `controllers.console.workspace.endpoint.EndpointIdPayload.__init__` [missing-argument]
-   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:327:46
+   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:329:46
 ERROR Missing argument `name` in function `controllers.console.workspace.endpoint.LegacyEndpointUpdatePayload.__init__` [missing-argument]
-   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:375:56
+   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:377:56
 ERROR Missing argument `endpoint_id` in function `controllers.console.workspace.endpoint.EndpointIdPayload.__init__` [missing-argument]
-   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:451:46
+   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:453:46
 ERROR Missing argument `endpoint_id` in function `controllers.console.workspace.endpoint.EndpointIdPayload.__init__` [missing-argument]
-   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:493:46
+   --> tests/unit_tests/controllers/console/workspace/test_endpoint.py:495:46
 ERROR Argument `list[FromClause]` is not assignable to parameter `tables` with type `Sequence[Table] | None` in function `sqlalchemy.sql.schema.MetaData.create_all` [bad-argument-type]
   --> tests/unit_tests/controllers/console/workspace/test_workspace.py:54:54
 ERROR `SimpleNamespace` is not assignable to attribute `db` with type `SQLAlchemy` [bad-assignment]

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 58.18% 58.20% +0.02%
Strict coverage 57.76% 57.77% +0.02%
Typed symbols 38,154 38,178 +24
Untyped symbols 27,626 27,626 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
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