Skip to content

Commit

Permalink
add docstring to warn_explicit_for
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Sep 20, 2022
1 parent 478ace4 commit 83ca2ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/_pytest/warning_types.py
Expand Up @@ -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__
Expand Down

0 comments on commit 83ca2ce

Please sign in to comment.