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

Method response_func

tests/GithubRetry.py:113–123  ·  view source on GitHub ↗
(content, reset=None)

Source from the content-addressed store, hash-verified

111
112 @staticmethod
113 def response_func(content, reset=None):
114 def response():
115 stream = BytesIO(content.encode("utf8"))
116 return urllib3.response.HTTPResponse(
117 body=stream,
118 preload_content=False,
119 headers={"X-RateLimit-Reset": f"{reset}"} if reset else {},
120 status=403,
121 )
122
123 return response
124
125 @contextlib.contextmanager
126 def mock_retry_now(self, now):

Calls

no outgoing calls