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

Method __postProcess

github/Requester.py:870–884  ·  view source on GitHub ↗
(
        self, verb: str, url: str, responseHeaders: dict[str, Any], data: Any
    )

Source from the content-addressed store, hash-verified

868 return responseHeaders, data
869
870 def __postProcess(
871 self, verb: str, url: str, responseHeaders: dict[str, Any], data: Any
872 ) -> tuple[dict[str, Any], Any]:
873 if verb == "GET" and isinstance(data, dict) and "url" not in data:
874 if "_links" in data and "self" in data["_links"] and data["_links"]["self"]:
875 self_link = data["_links"]["self"]
876 if isinstance(self_link, str):
877 data["url"] = self_link
878 elif isinstance(self_link, dict):
879 href = self_link.get("href")
880 if href:
881 data["url"] = href
882 else:
883 data["url"] = url
884 return responseHeaders, data
885
886 @classmethod
887 def __hostnameHasDomain(cls, hostname: str, domain_or_domains: str | list[str]) -> bool:

Callers 4

requestJsonAndCheckMethod · 0.95
requestBlobAndCheckMethod · 0.95

Calls 1

getMethod · 0.80

Tested by

no test coverage detected