mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-10-31 07:57:43 +03:00 
			
		
		
		
	Add overload for Factory typing
This commit is contained in:
		
							parent
							
								
									b446dab559
								
							
						
					
					
						commit
						541641d36c
					
				|  | @ -169,7 +169,10 @@ class Configuration(Object): | ||||||
| class Factory(Provider, Generic[T]): | class Factory(Provider, Generic[T]): | ||||||
|     provided_type: Optional[Type] |     provided_type: Optional[Type] | ||||||
|     def __init__(self, provides: _Callable[..., T], *args: Injection, **kwargs: Injection) -> None: ... |     def __init__(self, provides: _Callable[..., T], *args: Injection, **kwargs: Injection) -> None: ... | ||||||
|     def __call__(self, *args: Injection, **kwargs: Injection) -> Union[T, Awaitable[T]]: ... |     @overload | ||||||
|  |     def __call__(self, *args: Injection, **kwargs: Injection) -> T: ... | ||||||
|  |     @overload | ||||||
|  |     def __call__(self, *args: Injection, **kwargs: Injection) -> Awaitable[T]: ... | ||||||
|     @property |     @property | ||||||
|     def cls(self) -> T: ... |     def cls(self) -> T: ... | ||||||
|     @property |     @property | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user