mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 15:35:05 +02:00
Fix some typing errors
It seems like the type hints have gotten better :)
This commit is contained in:
parent
5646e933fd
commit
ebcfb2a2f3
10 changed files with 51 additions and 71 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue