mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-30 13:33:59 +03:00
15 lines
296 B
Python
15 lines
296 B
Python
|
from dependency_injector import providers
|
||
|
|
||
|
|
||
|
class Container:
|
||
|
...
|
||
|
|
||
|
|
||
|
# Test 1: to check the return type
|
||
|
provider1 = providers.Container(Container)
|
||
|
var1: Container = provider1()
|
||
|
|
||
|
# Test 2: to check the getattr
|
||
|
provider2 = providers.Container(Container)
|
||
|
attr: providers.Provider = provider2.attr
|