aboutsummaryrefslogtreecommitdiffstats
path: root/botcore
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-06-26 19:25:56 +0400
committerGravatar Hassan Abouelela <[email protected]>2022-06-26 20:17:26 +0400
commitcabc6f7182c9b8f7999548d8d561ce6054af66d3 (patch)
tree90453b48e4f45cff80d5c8d70c5eabd6bb2df23e /botcore
parentFix Incorrect Typehints & Docstrings (diff)
Declare Static Method
The `maybe_raise_for_status` function is declared as a class function, but does not need to be so. Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'botcore')
-rw-r--r--botcore/site_api.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/botcore/site_api.py b/botcore/site_api.py
index d3a58b9c..44309f9d 100644
--- a/botcore/site_api.py
+++ b/botcore/site_api.py
@@ -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.