Skip to content

Commit

Permalink
Document PicklingError for ensure_annotations in multiprocessing (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
KeyWeeUsr authored and kislyuk committed Oct 7, 2019
1 parent 0970741 commit f1fb714
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ensure/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,12 @@ def f(x: int, y: float) -> float:
>>> ensure.EnsureError: Argument y of type <class 'int'> to
<function f at 0x109b7c710> does not match annotation type <class 'float'>
.. warning::
The current implementation of the decorator might trigger
a ``_pickle.PicklingError`` when a decorated function is run through
``multiprocessing``.
"""

if f.__defaults__:
Expand Down

0 comments on commit f1fb714

Please sign in to comment.