Skip to content

Commit

Permalink
Merge branch 'dev' into feat/telegram_interface_upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
pseusys committed Mar 18, 2024
2 parents efde7c3 + cda7984 commit f9a9d79
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions dff/script/conditions/std_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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.
"""
Expand All @@ -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 <Union[str, Pattern]>` with :py:const:`flags <Union[int, re.RegexFlag]>`.
`pattern` with `flags`.
:param pattern: The `RegExp` pattern.
:param flags: Flags for this pattern. Defaults to 0.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit f9a9d79

Please sign in to comment.