mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-25 19:14:00 +03:00
minor codestyle fixes
This commit is contained in:
parent
3c489c54bf
commit
a964f55802
|
@ -14,7 +14,7 @@ class Provider(object):
|
||||||
"""Base provider class."""
|
"""Base provider class."""
|
||||||
|
|
||||||
__IS_OBJECTS_PROVIDER__ = True
|
__IS_OBJECTS_PROVIDER__ = True
|
||||||
__slots__ = ('__IS_OBJECTS_PROVIDER__', 'overridden',)
|
__slots__ = ('__IS_OBJECTS_PROVIDER__', 'overridden')
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Initializer."""
|
"""Initializer."""
|
||||||
|
@ -71,7 +71,7 @@ class NewInstance(Provider):
|
||||||
New instance providers will create and return new instance on every call.
|
New instance providers will create and return new instance on every call.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ('provides', 'init_args', 'attributes', 'methods',)
|
__slots__ = ('provides', 'init_args', 'attributes', 'methods')
|
||||||
|
|
||||||
def __init__(self, provides, *injections):
|
def __init__(self, provides, *injections):
|
||||||
"""Initializer."""
|
"""Initializer."""
|
||||||
|
@ -180,7 +180,7 @@ class ExternalDependency(Provider):
|
||||||
|
|
||||||
"""External dependency provider."""
|
"""External dependency provider."""
|
||||||
|
|
||||||
__slots__ = ('instance_of', 'dependency',)
|
__slots__ = ('instance_of', 'dependency')
|
||||||
|
|
||||||
def __init__(self, instance_of):
|
def __init__(self, instance_of):
|
||||||
"""Initializer."""
|
"""Initializer."""
|
||||||
|
@ -261,7 +261,7 @@ class Callable(Provider):
|
||||||
dependencies injections.
|
dependencies injections.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ('calls', 'injections',)
|
__slots__ = ('calls', 'injections')
|
||||||
|
|
||||||
def __init__(self, calls, *injections):
|
def __init__(self, calls, *injections):
|
||||||
"""Initializer."""
|
"""Initializer."""
|
||||||
|
@ -315,7 +315,7 @@ class Config(Provider):
|
||||||
if paths:
|
if paths:
|
||||||
for path in paths:
|
for path in paths:
|
||||||
value = value[path]
|
value = value[path]
|
||||||
return value
|
return valueg
|
||||||
|
|
||||||
|
|
||||||
class _DeferredConfig(Provider):
|
class _DeferredConfig(Provider):
|
||||||
|
@ -325,7 +325,7 @@ class _DeferredConfig(Provider):
|
||||||
Deferred config providers provide an value from the root config object.
|
Deferred config providers provide an value from the root config object.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__slots__ = ('paths', 'root_config',)
|
__slots__ = ('paths', 'root_config')
|
||||||
|
|
||||||
def __init__(self, paths, root_config):
|
def __init__(self, paths, root_config):
|
||||||
"""Initializer."""
|
"""Initializer."""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user