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

Treat validators as classes #7035

Merged
merged 4 commits into from
Jan 25, 2022
Merged

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Jan 25, 2022

Closes: #7028

@srittau srittau marked this pull request as ready for review January 25, 2022 10:04
stubs/jsonschema/jsonschema/validators.pyi Outdated Show resolved Hide resolved
@@ -4,18 +4,21 @@ from typing import Any, ClassVar

from ._utils import URIDict

_Schema = Any
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can apparently be a boolean or Mapping[str, str], or at least it is expected to have a .get() method similar to mappings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't have time to investigate this in depth and didn't want to make assumptions, but if you have determined the type I can include it.

@JelleZijlstra JelleZijlstra merged commit c2182fd into python:master Jan 25, 2022
@srittau srittau deleted the jsonschema-validator branch January 25, 2022 15:48
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.

Using types-jsonschema 4.4.0, mypy does not consider jsonschema.validators.Draft7Validator a type
3 participants