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