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

Method NEW_DEBUG_FRAME

github/Requester.py:341–355  ·  view source on GitHub ↗

Initialize a debug frame with requestHeader Frame count is updated and will be attached to respond header The structure of a frame: [requestHeader, statusCode, responseHeader, raw_data] Some of them may be None

(self, requestHeader: dict[str, str])

Source from the content-addressed store, hash-verified

339 ON_CHECK_ME: Callable | None = None
340
341 def NEW_DEBUG_FRAME(self, requestHeader: dict[str, str]) -> None:
342 """
343 Initialize a debug frame with requestHeader
344 Frame count is updated and will be attached to respond header
345 The structure of a frame: [requestHeader, statusCode, responseHeader, raw_data]
346 Some of them may be None
347 """
348 if self.DEBUG_FLAG: # pragma no branch (Flag always set in tests)
349 new_frame = [requestHeader, None, None, None]
350 if self._frameCount < self.DEBUG_FRAME_BUFFER_SIZE - 1: # pragma no branch (Should be covered)
351 self._frameBuffer.append(new_frame)
352 else:
353 self._frameBuffer[0] = new_frame # pragma no cover (Should be covered)
354
355 self._frameCount = len(self._frameBuffer) - 1
356
357 def DEBUG_ON_RESPONSE(self, statusCode: int, responseHeader: dict[str, str | int], data: str) -> None:
358 """

Callers 1

__requestEncodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected