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

Dict validation: Keep track of matched input keys #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sjakobi
Copy link
Contributor

@sjakobi sjakobi commented Oct 9, 2015

Fixes #80.

@codecov-io
Copy link

Current coverage is 99.37%

Merging #92 into master will increase coverage by +0.01% as of 0988074

@@            master     #92   diff @@
======================================
  Files            1       1       
  Stmts          157     159     +2
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit            156     158     +2
  Partial          0       0       
  Missed           1       1       

Review entire Coverage Diff as of 0988074

Powered by Codecov. Updated on successful CI builds.

schema.py Outdated
@@ -142,13 +143,15 @@ def validate(self, data):
if x is not None:
raise SchemaError(['Invalid value for key %r' % key] +
x.autos, [e] + x.errors)
matched_schema_keys = set(matched.keys())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could use 2 sets directly instead of the matched dict.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, of course. Thanks! :)

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