mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 23:45:05 +02:00
Make type hints compatible with Python 3.8
This commit is contained in:
parent
8da1ac6cee
commit
c4fb92c658
2 changed files with 10 additions and 8 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import asyncio
|
||||
from contextlib import AbstractAsyncContextManager, asynccontextmanager
|
||||
from typing import AsyncIterator
|
||||
from contextlib import asynccontextmanager
|
||||
# TODO If we upgrade to python 3.9, this context manager hint is deprecated
|
||||
from typing import AsyncContextManager, AsyncIterator
|
||||
|
||||
|
||||
class Limiter:
|
||||
|
|
@ -15,5 +16,5 @@ class Limiter:
|
|||
finally:
|
||||
self._semaphore.release()
|
||||
|
||||
def limit(self) -> AbstractAsyncContextManager[None]:
|
||||
def limit(self) -> AsyncContextManager[None]:
|
||||
return self._context_manager()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue