Fix some typing errors

It seems like the type hints have gotten better :)
This commit is contained in:
I-Al-Istannen
2025-10-19 15:59:08 +02:00
parent 5646e933fd
commit ebcfb2a2f3
10 changed files with 51 additions and 71 deletions

View File

@@ -125,11 +125,11 @@ class ReusableAsyncContextManager(ABC, Generic[T]):
# See https://stackoverflow.com/a/13075071
try:
result: T = await self._on_aenter()
except: # noqa: E722 do not use bare 'except'
return result
except:
if not await self.__aexit__(*sys.exc_info()):
raise
return result
raise
async def __aexit__(
self,