class-resolver icon indicating copy to clipboard operation
class-resolver copied to clipboard

Add simple resolver

Open mberr opened this issue 1 year ago • 2 comments

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 😉 ).

mberr avatar Mar 05 '23 20:03 mberr

Codecov Report

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

:exclamation: 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%) :arrow_down:

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

codecov-commenter avatar Mar 05 '23 20:03 codecov-commenter

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

cthoyt avatar Mar 07 '23 18:03 cthoyt