Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the behavior of field_is_complex to be more similar to pydantic v1 #31

Merged
merged 2 commits into from
Apr 27, 2023

Conversation

dmontagu
Copy link
Contributor

I discovered this discrepancy while helping Sebastian with FastAPI. @hramezani I'll defer to you whether the change makes sense. Feel free to modify the implementation, add tests, etc. Or request that I do it 😄

@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.08 🎉

Comparison is base (6d9c1a2) 95.91% compared to head (d584117) 96.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
+ Coverage   95.91%   96.00%   +0.08%     
==========================================
  Files           5        5              
  Lines         269      275       +6     
  Branches       66       67       +1     
==========================================
+ Hits          258      264       +6     
  Misses         10       10              
  Partials        1        1              
Impacted Files Coverage Δ
pydantic_settings/sources.py 96.08% <100.00%> (+0.10%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the behaviour is fine, but we should keep the method on the source so uses can override it more easily.

@dmontagu dmontagu force-pushed the improve-field-complex branch 3 times, most recently from 1a62c7b to 4f02775 Compare April 27, 2023 07:23
Copy link
Member

@hramezani hramezani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@hramezani
Copy link
Member

Thanks @dmontagu

@hramezani hramezani merged commit 4d82c97 into main Apr 27, 2023
18 checks passed
@hramezani hramezani deleted the improve-field-complex branch April 27, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants