mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-22 13:36:15 +03:00
Update mypy tests
This commit is contained in:
parent
66e7a9b645
commit
89ef4d5de7
|
@ -1,4 +1,4 @@
|
||||||
from typing import List, Iterator, Generator, AsyncIterator, AsyncGenerator
|
from typing import List, Iterator, Generator, AsyncIterator, AsyncGenerator, Optional
|
||||||
|
|
||||||
from dependency_injector import providers, resources
|
from dependency_injector import providers, resources
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class MyResource4(resources.Resource[List[int]]):
|
||||||
def init(self, *args, **kwargs) -> List[int]:
|
def init(self, *args, **kwargs) -> List[int]:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def shutdown(self, resource: List[int]) -> None:
|
def shutdown(self, resource: Optional[List[int]]) -> None:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ class MyResource8(resources.AsyncResource[List[int]]):
|
||||||
async def init(self, *args, **kwargs) -> List[int]:
|
async def init(self, *args, **kwargs) -> List[int]:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
async def shutdown(self, resource: List[int]) -> None:
|
async def shutdown(self, resource: Optional[List[int]]) -> None:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user