aboutsummaryrefslogtreecommitdiffstats
path: root/botcore/site_api.py
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2022-09-18 19:10:24 +0200
committerGravatar Numerlor <[email protected]>2022-09-18 19:14:08 +0200
commitb6f033e7f5fcdb827e7fed29a4ed21108e54a414 (patch)
tree99be74f8d90217e8d2dbeba442afce7ea04d5de6 /botcore/site_api.py
parentensure tuples from pos arg and kwarg tuples are differentiated (diff)
parentMerge pull request #138 from python-discord/bump-d.py (diff)
Merge remote-tracking branch 'upstream/main' into no-duplicate-deco
Diffstat (limited to 'botcore/site_api.py')
-rw-r--r--botcore/site_api.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/botcore/site_api.py b/botcore/site_api.py
index dbdf4f3b..44309f9d 100644
--- a/botcore/site_api.py
+++ b/botcore/site_api.py
@@ -26,7 +26,7 @@ class ResponseCodeError(ValueError):
Args:
response (:obj:`aiohttp.ClientResponse`): The response object from the request.
response_json: The JSON response returned from the request, if any.
- request_text: The text of the request, if any.
+ response_text: The text of the request, if any.
"""
self.status = response.status
self.response_json = response_json or {}
@@ -76,7 +76,8 @@ class APIClient:
"""Close the aiohttp session."""
await self.session.close()
- async def maybe_raise_for_status(self, response: aiohttp.ClientResponse, should_raise: bool) -> None:
+ @staticmethod
+ async def maybe_raise_for_status(response: aiohttp.ClientResponse, should_raise: bool) -> None:
"""
Raise :exc:`ResponseCodeError` for non-OK response if an exception should be raised.