summaryrefslogtreecommitdiff
path: root/pylint/reporters
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2023-03-21 09:00:23 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2023-03-21 09:17:44 +0100
commit95a82dc7ef54070e31dcecf56f2ded5348e3dfb7 (patch)
tree8418c2e5fe83438729e27d46863899f66b2e9a56 /pylint/reporters
parentd4a8b028d6b982e4756ab0daa7cbea137c296db7 (diff)
downloadpylint-git-95a82dc7ef54070e31dcecf56f2ded5348e3dfb7.tar.gz
Add explicit 'stack_level' keyword in Deprecation/User warnings
Diffstat (limited to 'pylint/reporters')
-rw-r--r--pylint/reporters/text.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pylint/reporters/text.py b/pylint/reporters/text.py
index 0467347c0..b30698e4d 100644
--- a/pylint/reporters/text.py
+++ b/pylint/reporters/text.py
@@ -137,7 +137,8 @@ class TextReporter(BaseReporter):
if argument[0] not in MESSAGE_FIELDS:
warnings.warn(
f"Don't recognize the argument '{argument[0]}' in the --msg-template. "
- "Are you sure it is supported on the current version of pylint?"
+ "Are you sure it is supported on the current version of pylint?",
+ stacklevel=2,
)
template = re.sub(r"\{" + argument[0] + r"(:.*?)?\}", "", template)
self._fixed_template = template