MCPcopy Index your code
hub / github.com/python-jsonschema/jsonschema / is_valid

Method is_valid

jsonschema/validators.py:485–500  ·  view source on GitHub ↗
(self, instance, _schema=None)

Source from the content-addressed store, hash-verified

483 self._ref_resolver.pop_scope()
484
485 def is_valid(self, instance, _schema=None):
486 if _schema is not None:
487 warnings.warn(
488 (
489 "Passing a schema to Validator.is_valid is deprecated "
490 "and will be removed in a future release. Call "
491 "validator.evolve(schema=new_schema).is_valid(...) "
492 "instead."
493 ),
494 DeprecationWarning,
495 stacklevel=2,
496 )
497 self = self.evolve(schema=_schema)
498
499 error = next(self.iter_errors(instance), None)
500 return error is None
501
502 evolve_fields = [
503 (field.name, field.alias)

Callers

nothing calls this directly

Calls 2

evolveMethod · 0.95
iter_errorsMethod · 0.95

Tested by

no test coverage detected