Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion allure-python-commons/src/_allure.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from functools import wraps
from typing import Any, Callable, TypeVar

from allure_commons._core import plugin_manager
from allure_commons.types import LabelType, LinkType
from allure_commons.utils import uuid4
from allure_commons.utils import func_parameters, represent

_TFunc = TypeVar("_TFunc", bound=Callable[..., Any])


def safely(result):
if result:
Expand Down Expand Up @@ -159,7 +162,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
plugin_manager.hook.stop_step(uuid=self.uuid, title=self.title, exc_type=exc_type, exc_val=exc_val,
exc_tb=exc_tb)

def __call__(self, func):
def __call__(self, func: _TFunc) -> _TFunc:
@wraps(func)
def impl(*a, **kw):
__tracebackhide__ = True
Expand Down