You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restrict --validator-class to types (no functions)
In order to better guarantee that `--validator-class` provides the
name of a `jsonschema.protocols.Validator` class, require that the
value passed is a type and not an alternative function.
This requirement does not lose significant expressive power and allows
us to more safely assume that the validator really is an
implementation of the protocol which can be extended with
`--fill-defaults` and other validator-related hooks.
There is no real way to guarantee the safety of using the user's
Validator. After all -- it could always raise an error at any time --
but this matches check-jsonschema's expectations about the argument
better.
This change can always be reverted in the future if there is
significant demand for a function-as-a-validator-class option.
0 commit comments