From 4fd0b4d5e8f67810cb08370504a57d38c6e3d89c Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Mon, 19 Feb 2024 21:40:07 +0000 Subject: ruff lint fix: Breaking changes to make bool args kwarg-only --- pydis_core/site_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pydis_core/site_api.py') diff --git a/pydis_core/site_api.py b/pydis_core/site_api.py index 69e0ceba..f948cde3 100644 --- a/pydis_core/site_api.py +++ b/pydis_core/site_api.py @@ -76,7 +76,7 @@ class APIClient: await self.session.close() @staticmethod - async def maybe_raise_for_status(response: aiohttp.ClientResponse, should_raise: bool) -> None: + 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. @@ -117,7 +117,7 @@ class APIClient: if resp.status == 204: return None - await self.maybe_raise_for_status(resp, raise_for_status) + await self.maybe_raise_for_status(resp, should_raise=raise_for_status) return await resp.json() async def get(self, endpoint: str, *, raise_for_status: bool = True, **kwargs) -> dict | None: -- cgit v1.2.3