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

Method __init__

github/Installation.py:89–102  ·  view source on GitHub ↗
(
        self,
        requester: Requester,
        headers: dict[str, str | int],
        attributes: Any,
    )

Source from the content-addressed store, hash-verified

87 """
88
89 def __init__(
90 self,
91 requester: Requester,
92 headers: dict[str, str | int],
93 attributes: Any,
94 ) -> None:
95 super().__init__(requester, headers, attributes)
96
97 auth = self._requester.auth if self._requester is not None else None
98 # Usually, an Installation is created from a Requester with App authentication
99 if isinstance(auth, AppAuth):
100 # But the installation has to authenticate as an installation (e.g. for get_repos())
101 auth = auth.get_installation_auth(self.id, requester=self._requester)
102 self._requester = self._requester.withAuth(auth)
103
104 def _initAttributes(self) -> None:
105 self._access_tokens_url: Attribute[str] = NotSet

Callers

nothing calls this directly

Calls 2

get_installation_authMethod · 0.80
withAuthMethod · 0.80

Tested by

no test coverage detected