From 3ed5bafbea80cc13d6951d36ed5462dd39d714f3 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Mon, 26 Oct 2015 15:52:09 +0000 Subject: Make check_singleton_comparison a private function. --- pylint/checkers/base.py | 6 +++--- 1 file 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) -- cgit v1.2.1