mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 09:57:37 +03:00 
			
		
		
		
	Add Container provider
This commit is contained in:
		
							parent
							
								
									86021f2948
								
							
						
					
					
						commit
						1d75085c87
					
				| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
recursive-include src/dependency_injector *.py *.pyx *.pxd *.c
 | 
					recursive-include src/dependency_injector *.py *.pyx *.pxd *.c *.pyi py.typed
 | 
				
			||||||
recursive-include tests *.py
 | 
					recursive-include tests *.py
 | 
				
			||||||
include README.rst
 | 
					include README.rst
 | 
				
			||||||
include CONTRIBUTORS.rst
 | 
					include CONTRIBUTORS.rst
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										6
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								setup.py
									
									
									
									
									
								
							| 
						 | 
					@ -57,7 +57,11 @@ setup(name='dependency-injector',
 | 
				
			||||||
                    extra_compile_args=['-O2']),
 | 
					                    extra_compile_args=['-O2']),
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      package_data={
 | 
					      package_data={
 | 
				
			||||||
          'dependency_injector': ['*.pxd'],
 | 
					          'dependency_injector': [
 | 
				
			||||||
 | 
					              '*.pxd',
 | 
				
			||||||
 | 
					              '*.pyi',
 | 
				
			||||||
 | 
					              'py.typed',
 | 
				
			||||||
 | 
					          ],
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      zip_safe=True,
 | 
					      zip_safe=True,
 | 
				
			||||||
      license='BSD New',
 | 
					      license='BSD New',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										7
									
								
								src/dependency_injector/providers.pyi
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								src/dependency_injector/providers.pyi
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,7 @@
 | 
				
			||||||
 | 
					from typing import TypeVar
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					R = TypeVar('R')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def Container(container: R) -> R:
 | 
				
			||||||
 | 
					    ...
 | 
				
			||||||
| 
						 | 
					@ -606,6 +606,13 @@ cdef class DependenciesContainer(Object):
 | 
				
			||||||
            provider.override(dependency_provider)
 | 
					            provider.override(dependency_provider)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class Container(DependenciesContainer):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def __init__(self, container):
 | 
				
			||||||
 | 
					        self.container = container
 | 
				
			||||||
 | 
					        super().__init__()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cdef class OverridingContext(object):
 | 
					cdef class OverridingContext(object):
 | 
				
			||||||
    """Provider overriding context.
 | 
					    """Provider overriding context.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										0
									
								
								src/dependency_injector/py.typed
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/dependency_injector/py.typed
									
									
									
									
									
										Normal file
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user