refactor: replace manual model_validate with @model_validate in workspace remaining controllers - #40239
Queued
likalikali wants to merge 2 commits into
Queued
refactor: replace manual model_validate with @model_validate in workspace remaining controllers#40239likalikali wants to merge 2 commits into
likalikali wants to merge 2 commits into
Conversation
likalikali
requested review from
CourTeous33,
QuantumGhost and
laipz8200
as code owners
August 9, 2026 05:39
Contributor
|
conflict |
…pace remaining controllers
likalikali
force-pushed
the
dep-inject-workspace-rest-mv
branch
from
August 9, 2026 07:45
4bae982 to
c717762
Compare
Contributor
Pyrefly Diffbase → 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]
|
Contributor
Pyrefly Type Coverage
|
asukaminato0721
enabled auto-merge
August 9, 2026 08:23
asukaminato0721
approved these changes
Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace manual model_validate(request.get_json()) calls with the @model_validate decorator in remaining workspace controller files.