mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-02-07 15:10:47 +03:00
Repair of config provider example
This commit is contained in:
parent
e6705f1089
commit
3d354a1cb5
|
@ -1,10 +1,8 @@
|
||||||
"""Config provider examples."""
|
"""Config provider examples."""
|
||||||
|
|
||||||
from objects.catalog import AbstractCatalog
|
from objects.catalog import AbstractCatalog
|
||||||
|
|
||||||
from objects.providers import Config
|
from objects.providers import Config
|
||||||
from objects.providers import NewInstance
|
from objects.providers import Factory
|
||||||
|
|
||||||
from objects.injections import KwArg
|
from objects.injections import KwArg
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +24,7 @@ class Catalog(AbstractCatalog):
|
||||||
config = Config()
|
config = Config()
|
||||||
""":type: (objects.Config)"""
|
""":type: (objects.Config)"""
|
||||||
|
|
||||||
object_a = NewInstance(ObjectA,
|
object_a = Factory(ObjectA,
|
||||||
KwArg('fee', config.FEE),
|
KwArg('fee', config.FEE),
|
||||||
KwArg('price', config.PRICE),
|
KwArg('price', config.PRICE),
|
||||||
KwArg('timezone', config.GLOBAL.TIMEZONE))
|
KwArg('timezone', config.GLOBAL.TIMEZONE))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user