Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ed18a83

Browse filesBrowse files
committed
Fix order of ns_resolver argument on complete_model_class
1 parent 51c0933 commit ed18a83
Copy full SHA for ed18a83

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed

‎pydantic/_internal/_model_construction.py

Copy file name to clipboardExpand all lines: pydantic/_internal/_model_construction.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ def wrapped_model_post_init(self: BaseModel, context: Any, /) -> None:
234234
complete_model_class(
235235
cls,
236236
config_wrapper,
237+
ns_resolver,
237238
raise_errors=False,
238-
ns_resolver=ns_resolver,
239239
create_model_module=_create_model_module,
240240
)
241241

@@ -572,8 +572,8 @@ def complete_model_class(
572572
Args:
573573
cls: BaseModel or dataclass.
574574
config_wrapper: The config wrapper instance.
575-
raise_errors: Whether to raise errors.
576575
ns_resolver: The namespace resolver instance to use during schema building.
576+
raise_errors: Whether to raise errors.
577577
create_model_module: The module of the class to be created, if created by `create_model`.
578578
579579
Returns:

‎pydantic/main.py

Copy file name to clipboardExpand all lines: pydantic/main.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,8 @@ def model_rebuild(
640640
return _model_construction.complete_model_class(
641641
cls,
642642
_config.ConfigWrapper(cls.model_config, check=False),
643+
ns_resolver,
643644
raise_errors=raise_errors,
644-
ns_resolver=ns_resolver,
645645
)
646646

647647
@classmethod

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.