Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Add Support for Literal Types #129

Merged
merged 5 commits into from
Sep 23, 2020
Merged

Conversation

seandstewart
Copy link
Owner

Bugfixes:

  • Lazy reprs eval to False, so we should check for a None when deciding on the error message at Constraints validation failure.
  • Optional fields for recursive types were not properly reflected at Schema generation.

Features:

@seandstewart seandstewart added this to the Typic 2.1 milestone Sep 11, 2020
@seandstewart seandstewart added bug Something isn't working enhancement New feature or request labels Sep 11, 2020
@seandstewart seandstewart self-assigned this Sep 11, 2020
@codecov
Copy link

codecov bot commented Sep 11, 2020

Codecov Report

Merging #129 into v2.1 will increase coverage by 0.05%.
The diff coverage is 93.03%.

Impacted file tree graph

@@            Coverage Diff             @@
##             v2.1     #129      +/-   ##
==========================================
+ Coverage   96.93%   96.99%   +0.05%     
==========================================
  Files          36       36              
  Lines        3854     3958     +104     
==========================================
+ Hits         3736     3839     +103     
- Misses        118      119       +1     
Flag Coverage Δ
#3.8 96.99% <93.03%> (+0.05%) ⬆️
#unittests 96.99% <93.03%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
typic/constraints/__init__.py 100.00% <ø> (ø)
typic/klass.py 95.12% <ø> (ø)
typic/types/email.py 100.00% <ø> (ø)
typic/serde/translator.py 97.52% <80.00%> (-0.77%) ⬇️
typic/constraints/common.py 92.50% <88.88%> (-0.33%) ⬇️
typic/ext/schema/schema.py 97.23% <92.06%> (-0.12%) ⬇️
typic/api.py 96.88% <100.00%> (ø)
typic/checks.py 96.74% <100.00%> (+0.08%) ⬆️
typic/compat.py 100.00% <100.00%> (ø)
typic/constraints/factory.py 100.00% <100.00%> (ø)
... and 8 more

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 0857bf8...85b878e. Read the comment docs.

@seandstewart seandstewart changed the base branch from main to v2.1 September 12, 2020 14:01
@syastrov
Copy link
Contributor

Very cool! 👍

@seandstewart seandstewart force-pushed the feature/87/literal-types-support branch 2 times, most recently from 020bf06 to f26db12 Compare September 23, 2020 01:36
@seandstewart seandstewart merged commit eed248c into v2.1 Sep 23, 2020
@seandstewart seandstewart deleted the feature/87/literal-types-support branch January 5, 2021 19:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validation of Literal types
2 participants