Merge branch 'main' into evadventure_work
This commit is contained in:
commit
979a79e832
1 changed files with 5 additions and 3 deletions
|
|
@ -2555,12 +2555,14 @@ def interactive(func):
|
||||||
elif isinstance(value, str):
|
elif isinstance(value, str):
|
||||||
if not caller:
|
if not caller:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"To retrieve input from a @pausable method, that method "
|
"To use `result yield('prompt')` in an @interactive method, that "
|
||||||
"must be called with a 'caller' argument)"
|
"method must have an argument named `caller`.)"
|
||||||
)
|
)
|
||||||
get_input(caller, value, _process_input, generator=generator)
|
get_input(caller, value, _process_input, generator=generator)
|
||||||
else:
|
else:
|
||||||
raise ValueError("yield(val) in a @pausable method must have an int/float as arg.")
|
raise ValueError(
|
||||||
|
"yield(val) in an @interactive method must have an int/float as arg."
|
||||||
|
)
|
||||||
|
|
||||||
def decorator(*args, **kwargs):
|
def decorator(*args, **kwargs):
|
||||||
argnames = inspect.getfullargspec(func).args
|
argnames = inspect.getfullargspec(func).args
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue