MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / __makeAbsoluteUrl

Method __makeAbsoluteUrl

github/Requester.py:1335–1345  ·  view source on GitHub ↗
(self, url: str)

Source from the content-addressed store, hash-verified

1333 self.__last_requests[verb] = datetime.now(timezone.utc).timestamp()
1334
1335 def __makeAbsoluteUrl(self, url: str) -> str:
1336 # URLs generated locally will be relative to __base_url
1337 # URLs returned from the server will start with __base_url
1338 if url.startswith("/"):
1339 url = f"{self.__prefix}{url}"
1340 else:
1341 o = urllib.parse.urlparse(url)
1342 url = o.path
1343 if o.query != "":
1344 url += f"?{o.query}"
1345 return url
1346
1347 def __createConnection(
1348 self, hostname: str | None = None

Callers 3

__requestEncodeMethod · 0.95
__requestRawMethod · 0.95
testMakeAbsoluteUrlMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected