Skip to content

Commit a79ea17

Browse files
committed
Update custom provider docs formatting
1 parent 781d3b9 commit a79ea17

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: docs/main/changelog.rst

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Development version
1515
and ``actions/download-artifact@v3``.
1616
- Fix install crash on non-utf8 systems `#644 <https://github.com/ets-labs/python-dependency-injector/pull/644>`_.
1717
- Update FastAPI Redis example to use ``aioredis`` version 2 `#613 <https://github.com/ets-labs/python-dependency-injector/pull/613>`_.
18+
- Update documentation on creating custom providers `#598 <https://github.com/ets-labs/python-dependency-injector/pull/598>`_.
1819
- Regenerate C sources using Cython 0.29.32.
1920

2021
4.40.0

Diff for: docs/providers/custom.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ To create a custom provider you need to follow these rules:
1717
2. You need to implement the ``Provider._provide()`` method.
1818
3. You need to implement the ``Provider.__deepcopy__()`` method. It should return an
1919
equivalent copy of a provider. All providers must be copied with the ``deepcopy()`` function
20-
from the ``providers`` module. It's essential to pass ``memo`` into ``deepcopy`` in order to keep the preconfigured ``args`` and ``kwargs`` of stored providers. After the a new provider object is created, use
21-
``Provider._copy_overriding()`` method to copy all overriding providers. See the example
22-
below.
20+
from the ``providers`` module. It's essential to pass ``memo`` into ``deepcopy`` in order to keep
21+
the preconfigured ``args`` and ``kwargs`` of stored providers. After the a new provider object
22+
is created, use ``Provider._copy_overriding()`` method to copy all overriding providers. See the
23+
example below.
2324
4. If new provider has a ``__init__()`` method, it should call the parent
2425
``Provider.__init__()``.
2526
5. If new provider stores any other providers, these providers should be listed in

0 commit comments

Comments
 (0)