Improve doc blocks in declarative_override_decorator.py example

This commit is contained in:
Roman Mogylatov 2021-02-18 08:18:24 -05:00
parent c7ba58c0af
commit 64a7a18f79

View File

@ -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):