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

Method resolving

jsonschema/validators.py:1047–1065  ·  view source on GitHub ↗

Resolve the given ``ref`` and enter its resolution scope. Exits the scope on exit of this context manager. Arguments: ref (str): The reference to resolve

(self, ref)

Source from the content-addressed store, hash-verified

1045
1046 @contextlib.contextmanager
1047 def resolving(self, ref):
1048 """
1049 Resolve the given ``ref`` and enter its resolution scope.
1050
1051 Exits the scope on exit of this context manager.
1052
1053 Arguments:
1054
1055 ref (str):
1056
1057 The reference to resolve
1058
1059 """
1060 url, resolved = self.resolve(ref)
1061 self.push_scope(url)
1062 try:
1063 yield resolved
1064 finally:
1065 self.pop_scope()
1066
1067 def _find_in_referrer(self, key):
1068 return self._get_subschemas_cache()[key]

Callers 1

_validate_referenceMethod · 0.45

Calls 3

resolveMethod · 0.95
push_scopeMethod · 0.95
pop_scopeMethod · 0.95

Tested by

no test coverage detected