Skip to content

Add kwarg checker #33

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 15 commits into
base: main
Choose a base branch
from
Draft

Add kwarg checker #33

wants to merge 15 commits into from

Conversation

cthoyt
Copy link
Owner

@cthoyt cthoyt commented Feb 15, 2022

This PR implements a pseudo-static type checker that takes a given dictionary to instantiate a given class and checks if it is correctly formatted. It raises an exception if it does not suffice.

This will be obviously useful for complex classes like PyKEEN models


DON'T MERGE WITHOUT 100% COVERAGE

finally, a proper opportunity to ensure this thing, because I basically just wrote a static type checker and i'm sure there's tons of stuff missing

@codecov-commenter
Copy link

codecov-commenter commented Feb 15, 2022

Codecov Report

Merging #33 (b98be1e) into main (495b8ec) will decrease coverage by 5.06%.
The diff coverage is 71.56%.

@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
- Coverage   95.87%   90.81%   -5.06%     
==========================================
  Files          12       13       +1     
  Lines         388      490     +102     
  Branches       62       89      +27     
==========================================
+ Hits          372      445      +73     
- Misses         12       35      +23     
- Partials        4       10       +6     
Impacted Files Coverage Δ
src/class_resolver/metaresolver.py 71.56% <71.56%> (ø)

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

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.

2 participants