diff options
author | Yilei "Dolee" Yang <yileiyang@google.com> | 2022-09-15 03:36:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 12:36:41 +0200 |
commit | a57edea63fa7a1edfcb63074f9e2a373ebabb7cd (patch) | |
tree | d7a18bd93116036518ddeed2a2253e72a2a7f5fc /pylint/message | |
parent | 27925396c85ffc443243589a0c03e430de9d7fa5 (diff) | |
download | pylint-git-a57edea63fa7a1edfcb63074f9e2a373ebabb7cd.tar.gz |
Use stacklevel=2 in warnings.warn calls to DeprecationWarning where makes sense. (#7465)
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'pylint/message')
-rw-r--r-- | pylint/message/message.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pylint/message/message.py b/pylint/message/message.py index 11961d9af..23dd6c082 100644 --- a/pylint/message/message.py +++ b/pylint/message/message.py @@ -43,6 +43,7 @@ class Message: # pylint: disable=too-many-instance-attributes warn( "In pylint 3.0, Messages will only accept a MessageLocationTuple as location parameter", DeprecationWarning, + stacklevel=2, ) location = MessageLocationTuple( location[0], |