

@contextlib.contextmanager
def resolving(self, ref):
    '\n        Context manager which resolves a JSON ``ref`` and enters the\n        resolution scope of this ref.\n\n        :argument str ref: reference to resolve\n\n        '
    full_uri = urljoin(self.resolution_scope, ref)
    (uri, fragment) = urldefrag(full_uri)
    if (not uri):
        uri = self.base_uri
    if (uri in self.store):
        document = self.store[uri]
    else:
        try:
            document = self.resolve_remote(uri)
        except Exception as exc:
            raise RefResolutionError(exc)
    (old_base_uri, self.base_uri) = (self.base_uri, uri)
    try:
        with self.in_scope(uri):
            (yield self.resolve_fragment(document, fragment))
    finally:
        self.base_uri = ref

dataset/ETHPy150Open danielyule/hearthbreaker/jsonschema/validators.py RefResolver.resolving/VarMisuse@162/255 `old_base_uri`->`ref`