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/checkers/base_checker.py | |
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/checkers/base_checker.py')
-rw-r--r-- | pylint/checkers/base_checker.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pylint/checkers/base_checker.py b/pylint/checkers/base_checker.py index e075ea413..0debfd3a2 100644 --- a/pylint/checkers/base_checker.py +++ b/pylint/checkers/base_checker.py @@ -54,6 +54,7 @@ class BaseChecker(_ArgumentsProvider): "longer supported. Child classes should only inherit BaseChecker or any " "of the other checker types from pylint.checkers.", DeprecationWarning, + stacklevel=2, ) if self.name is not None: self.name = self.name.lower() |