From 07c7b4018550babcf83e22ff8453593aa98da872 Mon Sep 17 00:00:00 2001 From: Dana Sorensen Date: Fri, 7 Feb 2025 10:49:54 -0700 Subject: [PATCH] add type hints to allure.step parameters --- allure-python-commons/src/_allure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/allure-python-commons/src/_allure.py b/allure-python-commons/src/_allure.py index 05e01dbd..04092385 100644 --- a/allure-python-commons/src/_allure.py +++ b/allure-python-commons/src/_allure.py @@ -1,5 +1,5 @@ from functools import wraps -from typing import Any, Callable, TypeVar +from typing import Any, Callable, TypeVar, Union from allure_commons._core import plugin_manager from allure_commons.types import LabelType, LinkType, ParameterMode @@ -161,7 +161,7 @@ def manual(): return Dynamic.label(LabelType.MANUAL, True) -def step(title): +def step(title: Union[str, _TFunc]): if callable(title): return StepContext(title.__name__, {})(title) else: