Skip to content

Commit 83ca2ce

Browse files
add docstring to warn_explicit_for
1 parent 478ace4 commit 83ca2ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/_pytest/warning_types.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ def format(self, **kwargs: Any) -> _W:
148148

149149

150150
def warn_explicit_for(method: FunctionType, message: PytestWarning) -> None:
151+
"""
152+
Issue the warning :param:`message` for the definition of the given :param:`method`
153+
154+
this helps to log warnigns for functions defined prior to finding an issue with them
155+
(like hook wrappers being marked in a legacy mechanism)
156+
"""
151157
lineno = method.__code__.co_firstlineno
152158
filename = inspect.getfile(method)
153159
module = method.__module__

0 commit comments

Comments
 (0)