mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-21 17:16:46 +03:00
making cleanup
This commit is contained in:
parent
143ba92b0a
commit
98435c953f
|
@ -5,7 +5,7 @@
|
|||
from .catalog import Catalog, overrides
|
||||
from .providers import (Provider, NewInstance, Singleton, Class, Object,
|
||||
Function, Value)
|
||||
from .injections import InitArg, Attribute, Method, uses
|
||||
from .injections import InitArg, Attribute, Method
|
||||
|
||||
|
||||
__all__ = ['Catalog', 'overrides',
|
||||
|
@ -15,4 +15,4 @@ __all__ = ['Catalog', 'overrides',
|
|||
'Object', 'Function', 'Value',
|
||||
|
||||
# Injections
|
||||
'InitArg', 'Attribute', 'Method', 'uses']
|
||||
'InitArg', 'Attribute', 'Method']
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
Injections module.
|
||||
"""
|
||||
|
||||
from inspect import isclass
|
||||
from functools import wraps
|
||||
|
||||
|
||||
class Injection(object):
|
||||
"""
|
||||
|
@ -44,14 +41,3 @@ class 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