mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-01-31 03:36:41 +03:00
Update changelog and injections API docs
This commit is contained in:
parent
7b611820c5
commit
6b098768f6
|
@ -93,8 +93,22 @@ class _NamedInjection(Injection):
|
||||||
__slots__ = ('name',)
|
__slots__ = ('name',)
|
||||||
|
|
||||||
def __init__(self, name, injectable):
|
def __init__(self, name, injectable):
|
||||||
"""Initializer."""
|
"""Initializer.
|
||||||
|
|
||||||
|
:param name: Injection target's name.
|
||||||
|
:type name: str
|
||||||
|
|
||||||
|
:param injectable: Injectable value, could be provider or any
|
||||||
|
other object.
|
||||||
|
:type injectable: object |
|
||||||
|
:py:class:`dependency_injector.providers.Provider`
|
||||||
|
"""
|
||||||
self.name = name
|
self.name = name
|
||||||
|
"""Injection target's name (keyword argument, attribute, method).
|
||||||
|
|
||||||
|
:type: str
|
||||||
|
"""
|
||||||
|
|
||||||
super(_NamedInjection, self).__init__(injectable)
|
super(_NamedInjection, self).__init__(injectable)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
@ -115,18 +129,36 @@ class _NamedInjection(Injection):
|
||||||
class KwArg(_NamedInjection):
|
class KwArg(_NamedInjection):
|
||||||
"""Keyword argument injection."""
|
"""Keyword argument injection."""
|
||||||
|
|
||||||
|
name = None
|
||||||
|
"""Keyword argument's name.
|
||||||
|
|
||||||
|
:type: str
|
||||||
|
"""
|
||||||
|
|
||||||
__IS_KWARG_INJECTION__ = True
|
__IS_KWARG_INJECTION__ = True
|
||||||
|
|
||||||
|
|
||||||
class Attribute(_NamedInjection):
|
class Attribute(_NamedInjection):
|
||||||
"""Attribute injection."""
|
"""Attribute injection."""
|
||||||
|
|
||||||
|
name = None
|
||||||
|
"""Attribute's name.
|
||||||
|
|
||||||
|
:type: str
|
||||||
|
"""
|
||||||
|
|
||||||
__IS_ATTRIBUTE_INJECTION__ = True
|
__IS_ATTRIBUTE_INJECTION__ = True
|
||||||
|
|
||||||
|
|
||||||
class Method(_NamedInjection):
|
class Method(_NamedInjection):
|
||||||
"""Method injection."""
|
"""Method injection."""
|
||||||
|
|
||||||
|
name = None
|
||||||
|
"""Method's name.
|
||||||
|
|
||||||
|
:type: str
|
||||||
|
"""
|
||||||
|
|
||||||
__IS_METHOD_INJECTION__ = True
|
__IS_METHOD_INJECTION__ = True
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,8 @@ follows `Semantic versioning`_
|
||||||
|
|
||||||
Development version
|
Development version
|
||||||
-------------------
|
-------------------
|
||||||
- No features.
|
- Improve representation of providers and injections.
|
||||||
|
|
||||||
|
|
||||||
1.11.1
|
1.11.1
|
||||||
------
|
------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user