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

Class Requester

github/Requester.py:284–1404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282
283
284class Requester:
285 __installation_authorization: InstallationAuthorization | None
286 __app_auth: AppAuthentication | None
287
288 __httpConnectionClass = HTTPRequestsConnectionClass
289 __httpsConnectionClass = HTTPSRequestsConnectionClass
290 __persist = True
291 __logger: logging.Logger | None = None
292
293 _frameBuffer: list[Any]
294
295 @staticmethod
296 def noopAuth(request: requests.models.PreparedRequest) -> requests.models.PreparedRequest:
297 return request
298
299 @classmethod
300 def injectConnectionClasses(
301 cls,
302 httpConnectionClass: type[HTTPRequestsConnectionClass],
303 httpsConnectionClass: type[HTTPSRequestsConnectionClass],
304 ) -> None:
305 cls.__persist = False
306 cls.__httpConnectionClass = httpConnectionClass
307 cls.__httpsConnectionClass = httpsConnectionClass
308
309 @classmethod
310 def resetConnectionClasses(cls) -> None:
311 cls.__persist = True
312 cls.__httpConnectionClass = HTTPRequestsConnectionClass
313 cls.__httpsConnectionClass = HTTPSRequestsConnectionClass
314
315 @classmethod
316 def injectLogger(cls, logger: logging.Logger) -> None:
317 cls.__logger = logger
318
319 @classmethod
320 def resetLogger(cls) -> None:
321 cls.__logger = None
322
323 #############################################################
324 # For Debug
325 @classmethod
326 def setDebugFlag(cls, flag: bool) -> None:
327 cls.DEBUG_FLAG = flag
328
329 @classmethod
330 def setOnCheckMe(cls, onCheckMe: Callable) -> None:
331 cls.ON_CHECK_ME = onCheckMe
332
333 DEBUG_FLAG = False
334
335 DEBUG_FRAME_BUFFER_SIZE = 1024
336
337 DEBUG_HEADER_KEY = "DEBUG_FRAME"
338
339 ON_CHECK_ME: Callable | None = None
340
341 def NEW_DEBUG_FRAME(self, requestHeader: dict[str, str]) -> None:

Callers 4

__init__Method · 0.90
__init__Method · 0.90
withAuthMethod · 0.70
withLazyMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…