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

Method __parseLinkHeader

github/PaginatedList.py:443–452  ·  view source on GitHub ↗
(self, headers: dict[str, str | int])

Source from the content-addressed store, hash-verified

441 return [self.__contentClass(self.__requester, {}, element) for element in nodes if element is not None]
442
443 def __parseLinkHeader(self, headers: dict[str, str | int]) -> dict[str, str]:
444 links = {}
445 if "link" in headers and isinstance(headers["link"], str):
446 linkHeaders = headers["link"].split(", ")
447 for linkHeader in linkHeaders:
448 url, rel, *rest = linkHeader.split("; ")
449 url = url[1:-1]
450 rel = rel[5:-1]
451 links[rel] = url
452 return links
453
454 def get_page(self, page: int) -> list[T]:
455 if self.is_graphql:

Callers 3

totalCountMethod · 0.95
_getLastPageUrlMethod · 0.95
_getPageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected