Update changelog and injections API docs

This commit is contained in:
Roman Mogilatov 2015-12-11 11:35:48 +02:00
parent 7b611820c5
commit 6b098768f6
2 changed files with 35 additions and 2 deletions

View File

@ -93,8 +93,22 @@ class _NamedInjection(Injection):
__slots__ = ('name',)
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
"""Injection target's name (keyword argument, attribute, method).
:type: str
"""
super(_NamedInjection, self).__init__(injectable)
def __str__(self):
@ -115,18 +129,36 @@ class _NamedInjection(Injection):
class KwArg(_NamedInjection):
"""Keyword argument injection."""
name = None
"""Keyword argument's name.
:type: str
"""
__IS_KWARG_INJECTION__ = True
class Attribute(_NamedInjection):
"""Attribute injection."""
name = None
"""Attribute's name.
:type: str
"""
__IS_ATTRIBUTE_INJECTION__ = True
class Method(_NamedInjection):
"""Method injection."""
name = None
"""Method's name.
:type: str
"""
__IS_METHOD_INJECTION__ = True

View File

@ -9,7 +9,8 @@ follows `Semantic versioning`_
Development version
-------------------
- No features.
- Improve representation of providers and injections.
1.11.1
------