Skip to content

Commit 0d5fd6a

Browse files
committed
Fix warning stack level
1 parent 8b9fd3a commit 0d5fd6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pluggy/callers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def excinfo(self):
3737
def result(self):
3838
"""Get the result(s) for this hook call (DEPRECATED in favor of ``get_result()``)."""
3939
msg = 'Use get_result() which forces correct exception handling'
40-
warnings.warn(DeprecationWarning(msg))
40+
warnings.warn(DeprecationWarning(msg), stacklevel=2)
4141
return self._result
4242

4343
@classmethod

0 commit comments

Comments
 (0)