-
-
Notifications
You must be signed in to change notification settings - Fork 610
Closed
Labels
EnhancementSome new desired functionalitySome new desired functionalityHelp WantedAn enhancement or bug for which a pull request is welcomed and which should have a clear definition.An enhancement or bug for which a pull request is welcomed and which should have a clear definition.
Description
I have an issue similar to #239 but somewhat different.
I would like to be able to reach IValidator to use type-hinting in functions.
If I want to create a function where a validator can be passed in parameter, it cannot be type-hinted:
def handle_ndjson(
path:str,
validator:jsonschema.IValidator,
valid_object_fn: Callable[[dict], None],
invalid_object_fn: Callable[[dict, jsonschema.ValidationException], None]):
fails because jsonschema.IValidator isn't exposed (as explained in #239).
The purpose is not to allow the creation of new validator, but to allow the user to chose between the different draft. Is there a graceful way to do that?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
EnhancementSome new desired functionalitySome new desired functionalityHelp WantedAn enhancement or bug for which a pull request is welcomed and which should have a clear definition.An enhancement or bug for which a pull request is welcomed and which should have a clear definition.