feat: add docstring (#1819)

Co-authored-by: João Moura <joaomdmoura@gmail.com>
This commit is contained in:
Marco Vinciguerra
2024-12-31 05:51:43 +01:00
committed by GitHub
parent 45b802a625
commit a548463fae
5 changed files with 11 additions and 3 deletions

View File

@@ -95,7 +95,6 @@ def start(condition: Optional[Union[str, dict, Callable]] = None) -> Callable:
return decorator
def listen(condition: Union[str, dict, Callable]) -> Callable:
"""
Creates a listener that executes when specified conditions are met.
@@ -198,7 +197,6 @@ def router(condition: Union[str, dict, Callable]) -> Callable:
"""
def decorator(func):
func.__is_router__ = True
# Handle conditions like listen/start
if isinstance(condition, str):
func.__trigger_methods__ = [condition]
func.__condition_type__ = "OR"
@@ -220,7 +218,6 @@ def router(condition: Union[str, dict, Callable]) -> Callable:
return decorator
def or_(*conditions: Union[str, dict, Callable]) -> dict:
"""
Combines multiple conditions with OR logic for flow control.