Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.2k
Change the signature ofConfigWrapper.core_config
to take the title directly#10562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
2 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
NextNext commit
Change the signature of
ConfigWrapper.core_config
to take the title…… directly
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit1afd1ba9f0eed193193298013e0d445792b3108c
There are no files selected for viewing
4 changes: 2 additions & 2 deletionspydantic/_internal/_config.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -154,7 +154,7 @@ def __getattr__(self, name: str) -> Any: | ||
except KeyError: | ||
raise AttributeError(f'Config has no attribute {name!r}') from None | ||
def core_config(self,title: str | None) -> core_schema.CoreConfig: | ||
"""Create a pydantic-core config, `obj` is just used to populate `title` if not set in config. | ||
Viicos marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
Pass `obj=None` if you do not want to attempt to infer the `title`. | ||
@@ -185,7 +185,7 @@ def core_config(self, obj: Any) -> core_schema.CoreConfig: | ||
config['ser_json_timedelta'] = 'seconds_float' | ||
core_config_values = { | ||
'title': config.get('title') ortitle or None, | ||
'extra_fields_behavior': config.get('extra'), | ||
'allow_inf_nan': config.get('allow_inf_nan'), | ||
'populate_by_name': config.get('populate_by_name'), | ||
2 changes: 1 addition & 1 deletionpydantic/_internal/_dataclasses.py
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
6 changes: 3 additions & 3 deletionspydantic/_internal/_generate_schema.py
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
2 changes: 1 addition & 1 deletionpydantic/_internal/_model_construction.py
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
2 changes: 1 addition & 1 deletionpydantic/_internal/_validate_call.py
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
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.