(self, instance, _schema=None)
| 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) |
nothing calls this directly
no test coverage detected