mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 09:36:48 +03:00
making cleanup
This commit is contained in:
parent
143ba92b0a
commit
98435c953f
|
@ -5,7 +5,7 @@
|
||||||
from .catalog import Catalog, overrides
|
from .catalog import Catalog, overrides
|
||||||
from .providers import (Provider, NewInstance, Singleton, Class, Object,
|
from .providers import (Provider, NewInstance, Singleton, Class, Object,
|
||||||
Function, Value)
|
Function, Value)
|
||||||
from .injections import InitArg, Attribute, Method, uses
|
from .injections import InitArg, Attribute, Method
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['Catalog', 'overrides',
|
__all__ = ['Catalog', 'overrides',
|
||||||
|
@ -15,4 +15,4 @@ __all__ = ['Catalog', 'overrides',
|
||||||
'Object', 'Function', 'Value',
|
'Object', 'Function', 'Value',
|
||||||
|
|
||||||
# Injections
|
# Injections
|
||||||
'InitArg', 'Attribute', 'Method', 'uses']
|
'InitArg', 'Attribute', 'Method']
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
Injections module.
|
Injections module.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from inspect import isclass
|
|
||||||
from functools import wraps
|
|
||||||
|
|
||||||
|
|
||||||
class Injection(object):
|
class Injection(object):
|
||||||
"""
|
"""
|
||||||
|
@ -44,14 +41,3 @@ class Method(Injection):
|
||||||
"""
|
"""
|
||||||
Method injection.
|
Method injection.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def uses(provider):
|
|
||||||
"""
|
|
||||||
Providers usage decorator.
|
|
||||||
"""
|
|
||||||
def decorator(cls):
|
|
||||||
catalog = getattr(cls, 'catalog')
|
|
||||||
# catalog.__add__provider__(provider)
|
|
||||||
return cls
|
|
||||||
return decorator
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user