You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/providers/custom.rst
+4-3
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,10 @@ To create a custom provider you need to follow these rules:
17
17
2. You need to implement the ``Provider._provide()`` method.
18
18
3. You need to implement the ``Provider.__deepcopy__()`` method. It should return an
19
19
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.
23
24
4. If new provider has a ``__init__()`` method, it should call the parent
24
25
``Provider.__init__()``.
25
26
5. If new provider stores any other providers, these providers should be listed in
0 commit comments