mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 01:26:51 +03:00
Improve doc blocks in declarative_override_decorator.py example
This commit is contained in:
parent
c7ba58c0af
commit
64a7a18f79
|
@ -1,4 +1,4 @@
|
||||||
"""Declarative container provider overriding with `@override()` decorator."""
|
"""Declarative container provider overriding with ``@override()`` decorator."""
|
||||||
|
|
||||||
import sqlite3
|
import sqlite3
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
@ -11,7 +11,7 @@ class Container(containers.DeclarativeContainer):
|
||||||
database = providers.Singleton(sqlite3.connect, ':memory:')
|
database = providers.Singleton(sqlite3.connect, ':memory:')
|
||||||
|
|
||||||
|
|
||||||
# Overriding `Container` with `OverridingContainer`:
|
# Overriding ``Container`` with ``OverridingContainer``:
|
||||||
@containers.override(Container)
|
@containers.override(Container)
|
||||||
class OverridingContainer(containers.DeclarativeContainer):
|
class OverridingContainer(containers.DeclarativeContainer):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user