From f17f947006ae55f3baca2eeec7ce804dbfdac238 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Sun, 26 Jun 2022 19:23:46 +0400 Subject: Fix Incorrect Typehints & Docstrings Signed-off-by: Hassan Abouelela --- botcore/site_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'botcore/site_api.py') diff --git a/botcore/site_api.py b/botcore/site_api.py index dbdf4f3b..d3a58b9c 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 {} -- cgit v1.2.3 From cabc6f7182c9b8f7999548d8d561ce6054af66d3 Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Sun, 26 Jun 2022 19:25:56 +0400 Subject: 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 --- botcore/site_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'botcore/site_api.py') 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. -- cgit v1.2.3