diff --git a/src/_pytest/warning_types.py b/src/_pytest/warning_types.py index fd4b68e187c..88a51399182 100644 --- a/src/_pytest/warning_types.py +++ b/src/_pytest/warning_types.py @@ -148,6 +148,12 @@ def format(self, **kwargs: Any) -> _W: def warn_explicit_for(method: FunctionType, message: PytestWarning) -> None: + """ + Issue the warning :param:`message` for the definition of the given :param:`method` + + this helps to log warnigns for functions defined prior to finding an issue with them + (like hook wrappers being marked in a legacy mechanism) + """ lineno = method.__code__.co_firstlineno filename = inspect.getfile(method) module = method.__module__