add docstring to warn_explicit_for
This commit is contained in:
parent
7e8a4849d8
commit
ae9dbf5006
|
@ -148,6 +148,12 @@ class UnformattedWarning(Generic[_W]):
|
||||||
|
|
||||||
|
|
||||||
def warn_explicit_for(method: FunctionType, message: PytestWarning) -> None:
|
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
|
lineno = method.__code__.co_firstlineno
|
||||||
filename = inspect.getfile(method)
|
filename = inspect.getfile(method)
|
||||||
module = method.__module__
|
module = method.__module__
|
||||||
|
|
Loading…
Reference in New Issue