Update resources.py

This commit is contained in:
Chad 2023-10-26 14:52:43 -07:00 committed by GitHub
parent cc2304e46e
commit 00adf99c00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,3 +25,13 @@ class AsyncResource(Generic[T], metaclass=abc.ABCMeta):
async def shutdown(self, resource: Optional[T]) -> None:
...
class AsyncShutdownResource(Generic[T], metaclass=abc.ABCMeta):
@abc.abstractmethod
def init(self, *args, **kwargs) -> Optional[T]:
...
async def shutdown(self, resource: Optional[T]) -> None:
...