Skip to content

Add simple resolver #47

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

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Add simple resolver #47

wants to merge 17 commits into from

Conversation

mberr
Copy link
Collaborator

@mberr mberr commented Mar 5, 2023

This is particularly useful when dealing with enums / typing.Literal as it generates normalization code which ensures the given type without having to resort to typing.cast and gives useful error messages "for free", too (at the cost of using class-resolver 😉 ).

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2023

Codecov Report

Merging #47 (9b4ded8) into main (495b8ec) will decrease coverage by 0.81%.
The diff coverage is 77.77%.

❗ Current head 9b4ded8 differs from pull request most recent head 967f285. Consider uploading reports for the commit 967f285 to get more accurate results

@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
- Coverage   95.87%   95.07%   -0.81%     
==========================================
  Files          12       12              
  Lines         388      406      +18     
  Branches       62       67       +5     
==========================================
+ Hits          372      386      +14     
- Misses         12       14       +2     
- Partials        4        6       +2     
Impacted Files Coverage Δ
src/class_resolver/__init__.py 100.00% <ø> (ø)
src/class_resolver/base.py 94.69% <77.77%> (-2.68%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cthoyt
Copy link
Owner

cthoyt commented Mar 7, 2023

@mberr happy to consider this, but I'm not sure I get it. can you write some more examples?

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.

3 participants