parse_retry_tagΒΆ

.. py:function:: parse_retry_tag(tags: list[str] | None) -> int | None :module: behave_retry

Parse @retry:N tag from scenario tags.

Behave strips the leading @ from tags, so both @retry:N and retry:N are accepted. Only the first valid retry:N tag is parsed; subsequent ones are ignored.

:param tags: List of tag strings from a behave scenario, or None.

:returns: The retry count N if a valid retry:N tag is found, otherwise None.