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

Apply __modify_schema__ on enum schema rather than fields that use it #1581

Merged
merged 3 commits into from Jun 29, 2020

Conversation

therefromhere
Copy link
Contributor

@therefromhere therefromhere commented May 31, 2020

Change Summary

Make __modify_schema__ on enums apply to the enum schema rather than fields that use the enum.

Resolves #1576

Does this seem like a reasonable thing to do?

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)

@codecov
Copy link

codecov bot commented May 31, 2020

Codecov Report

Merging #1581 into master will decrease coverage by 0.05%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##            master    #1581      +/-   ##
===========================================
- Coverage   100.00%   99.94%   -0.06%     
===========================================
  Files           21       21              
  Lines         3793     3802       +9     
  Branches       752      757       +5     
===========================================
+ Hits          3793     3800       +7     
- Misses           0        1       +1     
- Partials         0        1       +1     
Impacted Files Coverage Δ
pydantic/schema.py 100.00% <100.00%> (ø)
pydantic/networks.py 99.21% <0.00%> (-0.79%) ⬇️
pydantic/types.py 100.00% <0.00%> (ø)
pydantic/fields.py 100.00% <0.00%> (ø)
pydantic/typing.py 100.00% <0.00%> (ø)
pydantic/validators.py 100.00% <0.00%> (ø)
pydantic/dataclasses.py 100.00% <0.00%> (ø)
pydantic/env_settings.py 100.00% <0.00%> (ø)
pydantic/class_validators.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2eb62a3...83ab781. Read the comment docs.

@samuelcolvin samuelcolvin merged commit ff20477 into pydantic:master Jun 29, 2020
@therefromhere therefromhere deleted the enum_modify_schema branch June 29, 2020 21:21
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.

Possible regression of __modify_schema__ for enum fields
2 participants