diff --git a/dff/script/conditions/std_conditions.py b/dff/script/conditions/std_conditions.py index 3959a1e71..d2d23f4e8 100644 --- a/dff/script/conditions/std_conditions.py +++ b/dff/script/conditions/std_conditions.py @@ -25,8 +25,8 @@ def exact_match(match: Message, skip_none: bool = True) -> Callable[[Context, Pipeline], bool]: """ Return function handler. This handler returns `True` only if the last user phrase - is the same Message as the :py:const:`match`. - If :py:const:`skip_none` the handler will not compare `None` fields of :py:const:`match`. + is the same Message as the `match`. + If `skip_none` the handler will not compare `None` fields of `match`. :param match: A Message variable to compare user request with. :param skip_none: Whether fields should be compared if they are `None` in :py:const:`match`. @@ -54,7 +54,7 @@ def exact_match_condition_handler(ctx: Context, pipeline: Pipeline) -> bool: def has_text(text: str) -> Callable[[Context, Pipeline], bool]: """ Return function handler. This handler returns `True` only if the last user phrase - contains the phrase specified in :py:param:`text`. + contains the phrase specified in `text`. :param text: A `str` variable to look for within the user request. """ @@ -70,7 +70,7 @@ def has_text_condition_handler(ctx: Context, pipeline: Pipeline) -> bool: def regexp(pattern: Union[str, Pattern], flags: Union[int, re.RegexFlag] = 0) -> Callable[[Context, Pipeline], bool]: """ Return function handler. This handler returns `True` only if the last user phrase contains - :py:const:`pattern ` with :py:const:`flags `. + `pattern` with `flags`. :param pattern: The `RegExp` pattern. :param flags: Flags for this pattern. Defaults to 0. @@ -187,9 +187,9 @@ def has_last_labels( ) -> Callable[[Context, Pipeline], bool]: """ Return condition handler. This handler returns `True` if any label from - last :py:const:`last_n_indices` context labels is in - the :py:const:`flow_labels` list or in - the :py:const:`~dff.script.NodeLabel2Type` list. + last `last_n_indices` context labels is in + the `flow_labels` list or in + the `~dff.script.NodeLabel2Type` list. :param flow_labels: List of labels to check. Every label has type `str`. Empty if not set. :param labels: List of labels corresponding to the nodes. Empty if not set.