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

feat: add default encoder for Pattern type #2056

Merged

Conversation

PrettyWood
Copy link
Member

Change Summary

As we allow Pattern to be used as a regular type and considering we now support Pattern when generating
schema (#1768) it makes sense to also add a default encoder for it

Related issue number

closes #2045

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 Oct 27, 2020

Codecov Report

Merging #2056 into master will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #2056   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         4094      4096    +2     
  Branches       821       822    +1     
=========================================
+ Hits          4094      4096    +2     
Impacted Files Coverage Δ
pydantic/json.py 100.00% <100.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 95435de...45ab251. Read the comment docs.

@samuelcolvin samuelcolvin merged commit 4020ebc into pydantic:master Nov 29, 2020
@PrettyWood PrettyWood deleted the feat/default_pattern_encoder branch December 17, 2020 20:47
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.

Pattern type serialisation error
2 participants