mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 17:47:02 +03:00
Minor updates for static provider docs
This commit is contained in:
parent
ef41688e61
commit
dbc368d5f6
|
@ -24,19 +24,19 @@ Example:
|
|||
from objects.providers import Value
|
||||
|
||||
|
||||
# Provides class - `object`
|
||||
# Provides class - `object`:
|
||||
cls_provider = Class(object)
|
||||
assert cls_provider() is object
|
||||
|
||||
# Provides object - `object()`
|
||||
# Provides object - `object()`:
|
||||
object_provider = Object(object())
|
||||
assert isinstance(object_provider(), object)
|
||||
|
||||
# Provides function - `len`
|
||||
# Provides function - `len`:
|
||||
function_provider = Function(len)
|
||||
assert function_provider() is len
|
||||
|
||||
# Provides value - `123`
|
||||
# Provides value - `123`:
|
||||
value_provider = Value(123)
|
||||
assert value_provider() == 123
|
||||
|
||||
|
|
|
@ -6,18 +6,18 @@ from objects.providers import Function
|
|||
from objects.providers import Value
|
||||
|
||||
|
||||
# Provides class - `object`
|
||||
# Provides class - `object`:
|
||||
cls_provider = Class(object)
|
||||
assert cls_provider() is object
|
||||
|
||||
# Provides object - `object()`
|
||||
# Provides object - `object()`:
|
||||
object_provider = Object(object())
|
||||
assert isinstance(object_provider(), object)
|
||||
|
||||
# Provides function - `len`
|
||||
# Provides function - `len`:
|
||||
function_provider = Function(len)
|
||||
assert function_provider() is len
|
||||
|
||||
# Provides value - `123`
|
||||
# Provides value - `123`:
|
||||
value_provider = Value(123)
|
||||
assert value_provider() == 123
|
||||
|
|
Loading…
Reference in New Issue
Block a user