

def resolve_remote(self, uri):
    "\n        Resolve a remote ``uri``.\n\n        If called directly, does not check the store first, but after\n        retrieving the document at the specified URI it will be saved in\n        the store if :attr:`cache_remote` is True.\n\n        .. note::\n\n            If the requests_ library is present, ``jsonschema`` will use it to\n            request the remote ``uri``, so that the correct encoding is\n            detected and used.\n\n            If it isn't, or if the scheme of the ``uri`` is not ``http`` or\n            ``https``, UTF-8 is assumed.\n\n        :argument str uri: the URI to resolve\n        :returns: the retrieved document\n\n        .. _requests: http://pypi.python.org/pypi/requests/\n\n        "
    scheme = urlsplit(uri).scheme
    if (scheme in self.handlers):
        result = self.handlers[scheme](uri)
    elif ((scheme in ['http', 'https']) and requests and (getattr(requests.Response, 'json', None) is not None)):
        if callable(requests.Response.json):
            result = requests.get(uri).json()
        else:
            result = requests.get(uri).json
    else:
        result = json.loads(urlopen(uri).read().decode('utf-8'))
    if self.cache_remote:
        self.store[self] = result
    return result

dataset/ETHPy150Open danielyule/hearthbreaker/jsonschema/validators.py RefResolver.resolve_remote/VarMisuse@160/450 `uri`->`self`