From 89ef4d5de7ba553863f562637fbe6e669dd547c1 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Thu, 19 Aug 2021 18:40:58 -0400 Subject: [PATCH] Update mypy tests --- tests/typing/resource.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/typing/resource.py b/tests/typing/resource.py index b5687451..b468df42 100644 --- a/tests/typing/resource.py +++ b/tests/typing/resource.py @@ -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 @@ -35,7 +35,7 @@ class MyResource4(resources.Resource[List[int]]): def init(self, *args, **kwargs) -> List[int]: 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]: return [] - async def shutdown(self, resource: List[int]) -> None: + async def shutdown(self, resource: Optional[List[int]]) -> None: ...