fix: typing tests

This commit is contained in:
Gonzalo Martinez 2025-01-07 12:30:43 -08:00
parent 839de5d527
commit 185a491521
6 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ provider5 = providers.Dict(
a1=providers.Factory(object),
a2=providers.Factory(object),
)
provided5: dict[Any, Any] = provider5.provided
provided5: dict[Any, Any] = provider5.provided()
# Test 6: to check the return type with await

View File

@ -37,7 +37,7 @@ attributes4: Dict[str, Any] = provider4.attributes
# Test 5: to check the provided instance interface
provider5 = providers.Factory(Animal)
provided5: Animal = provider5.provided
provided5: Animal = provider5.provided()
# Test 6: to check the DelegatedFactory
provider6 = providers.DelegatedFactory(Cat)

View File

@ -23,7 +23,7 @@ provider3 = providers.List(
providers.Factory(object),
providers.Factory(object),
)
provided3: List[Any] = provider3.provided
provided3: List[Any] = provider3.provided()
# Test 4: to check the return type with await
provider4 = providers.List(

View File

@ -9,7 +9,7 @@ var1: int = provider1()
# Test 2: to check the provided instance interface
provider2 = providers.Object(int)
provided2: Type[int] = provider2.provided
provided2: Type[int] = provider2.provided()
# Test 3: to check the return type with await
provider3 = providers.Object(int(3))

View File

@ -3,7 +3,7 @@ from dependency_injector import providers
# Test 1: to check .provided attribute
provider1: providers.Provider[int] = providers.Object(1)
provided: int = provider1.provided
provided: int = provider1.provided()
# Test 2: to check async mode API
provider2: providers.Provider = providers.Provider()

View File

@ -37,7 +37,7 @@ attributes4: Dict[str, Any] = provider4.attributes
# Test 5: to check the provided instance interface
provider5 = providers.Singleton(Animal)
provided5: Animal = provider5.provided
provided5: Animal = provider5.provided()
# Test 6: to check the DelegatedSingleton
provider6 = providers.DelegatedSingleton(Cat)