From 8caf6b890b27e05d02ada2633fe518907a1ac950 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Mon, 26 Oct 2015 15:51:38 +0000 Subject: Update the docstring a little bit. --- pylint/checkers/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pylint/checkers/base.py b/pylint/checkers/base.py index 9958787..7aaf0bc 100644 --- a/pylint/checkers/base.py +++ b/pylint/checkers/base.py @@ -1455,7 +1455,7 @@ class LambdaForComprehensionChecker(_BasicChecker): class ComparisonChecker(_BasicChecker): - """checks for singleton comparison and for yoda condition + """Checks for comparisons - singleton comparison: 'expr == True', 'expr == False' and 'expr == None' - yoda condition: 'const "comp" right' where comp can be '==', '!=', '<', @@ -1469,7 +1469,8 @@ class ComparisonChecker(_BasicChecker): 'C0151': ('Comparison should be %s', 'misplaced-comparison-constant', 'Used when the constant is placed on the left side' - 'of a comparison'), + 'of a comparison. It is usually clearer in intent to ' + 'place it in the right hand side of the comparison.'), } def check_singleton_comparison(self, singleton, root_node): -- cgit v1.2.1