Skip to content

Commit c916978

Browse files
committed
document resolve_effect's parameters
1 parent fb50021 commit c916978

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

effect/testing.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ def resolve_effect(effect, result, is_error=False):
8282
NOTE: parallel effects have no special support. They can be resolved with
8383
a sequence, and if they're returned from another effect's callback they
8484
will be returned just like any other effect.
85+
86+
:param bool is_error: Indicate whether the result should be treated as an
87+
exception or a regular result.
88+
89+
:param result: If ``is_error`` is False, this can be any object and will be
90+
treated as the result of the effect. If ``is_error`` is True, this must
91+
be a three-tuple in the style of ``sys.exc_info``.
8592
"""
8693
for i, (callback, errback) in enumerate(effect.callbacks):
8794
cb = errback if is_error else callback

0 commit comments

Comments
 (0)