summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-10-26 15:52:09 +0000
committerClaudiu Popa <pcmanticore@gmail.com>2015-10-26 15:52:09 +0000
commit3ed5bafbea80cc13d6951d36ed5462dd39d714f3 (patch)
tree37df0e8173328970a8dfe64187fbf0e91a57d75d
parent8caf6b890b27e05d02ada2633fe518907a1ac950 (diff)
downloadpylint-3ed5bafbea80cc13d6951d36ed5462dd39d714f3.tar.gz
Make check_singleton_comparison a private function.
-rw-r--r--pylint/checkers/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pylint/checkers/base.py b/pylint/checkers/base.py
index 7aaf0bc..894c429 100644
--- a/pylint/checkers/base.py
+++ b/pylint/checkers/base.py
@@ -1473,7 +1473,7 @@ class ComparisonChecker(_BasicChecker):
'place it in the right hand side of the comparison.'),
}
- def check_singleton_comparison(self, singleton, root_node):
+ def _check_singleton_comparison(self, singleton, root_node):
if singleton.value is True:
suggestion = "just 'expr' or 'expr is True'"
self.add_message('singleton-comparison',
@@ -1514,9 +1514,9 @@ class ComparisonChecker(_BasicChecker):
if operator == '==':
if isinstance(left, astroid.Const):
self._check_misplaced_constant(node, left, right, operator)
- self.check_singleton_comparison(left, node)
+ self._check_singleton_comparison(left, node)
elif isinstance(right, astroid.Const):
- self.check_singleton_comparison(right, node)
+ self._check_singleton_comparison(right, node)
elif (operator in ('<', '<=', '>', '>=', '!=')
and isinstance(left, astroid.Const)):
self._check_misplaced_constant(node, left, right, operator)