Skip to content

Commit

Permalink
Edit docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
liamhuber committed Aug 8, 2024
1 parent 4da55b9 commit 3fdea7d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions pyiron_snippets/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,15 @@ class _FactoryMade(ABC):
"""
A mix-in to make class-factory-produced classes pickleable.
If the factory is used as a decorator for another function, it will conflict with
this function (i.e. the owned function will be the true function, and will mismatch
with imports from that location, which will return the post-decorator factory made
class). This can be resolved by setting the :attr:`_reduce_imports_as` attribute
to a tuple of the (module, qualname) obtained from the decorated definition (or,
-- DEPRECATED -- set :attr:`_class_returns_from_decorated_function` attribute to be
the decorated function in the decorator definition.)
If the factory is used as a decorator for another function (or class), it will
conflict with this function (i.e. the owned function will be the true function,
and will mismatch with imports from that location, which will return the
post-decorator factory made class). This can be resolved by setting the
:attr:`_reduce_imports_as` attribute to a tuple of the (module, qualname) obtained
from the decorated definition in order to manually specify where it should be
re-imported from. (DEPRECATED alternative: set
:attr:`_class_returns_from_decorated_function` attribute to be the decorated
function in the decorator definition.)
"""

# DEPRECATED: Use _reduce_imports_as instead
Expand Down

0 comments on commit 3fdea7d

Please sign in to comment.