summaryrefslogtreecommitdiff
path: root/pylint/checkers/base
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2022-05-13 18:26:30 +0200
committerGitHub <noreply@github.com>2022-05-13 18:26:30 +0200
commit0c37d4c6875e0c1c81a51cd1a02ee270d50c53df (patch)
treede6890dba3567dc814af5bd18f2cab46b0995e8f /pylint/checkers/base
parent30042ece14dd32d6569e04c8984ece95f00ecc21 (diff)
downloadpylint-git-0c37d4c6875e0c1c81a51cd1a02ee270d50c53df.tar.gz
Update ranges for error messages (#6606)
* using-constant-test * missing-parentheses-for-call-in-test
Diffstat (limited to 'pylint/checkers/base')
-rw-r--r--pylint/checkers/base/basic_checker.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pylint/checkers/base/basic_checker.py b/pylint/checkers/base/basic_checker.py
index e4526cac6..312e6c519 100644
--- a/pylint/checkers/base/basic_checker.py
+++ b/pylint/checkers/base/basic_checker.py
@@ -312,7 +312,7 @@ class BasicChecker(_BasicChecker):
inferred = utils.safe_infer(test)
if emit:
- self.add_message("using-constant-test", node=node)
+ self.add_message("using-constant-test", node=test)
elif isinstance(inferred, const_nodes):
# If the constant node is a FunctionDef or Lambda then
# it may be an illicit function call due to missing parentheses
@@ -329,12 +329,12 @@ class BasicChecker(_BasicChecker):
for inf_call in call_inferred:
if inf_call != astroid.Uninferable:
self.add_message(
- "missing-parentheses-for-call-in-test", node=node
+ "missing-parentheses-for-call-in-test", node=test
)
break
except astroid.InferenceError:
pass
- self.add_message("using-constant-test", node=node)
+ self.add_message("using-constant-test", node=test)
def visit_module(self, _: nodes.Module) -> None:
"""Check module name, docstring and required arguments."""