summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-10-26 15:51:38 +0000
committerClaudiu Popa <pcmanticore@gmail.com>2015-10-26 15:51:38 +0000
commit8caf6b890b27e05d02ada2633fe518907a1ac950 (patch)
tree7dad627ed577d5cfc7500b9fa261cbcc2e525d41
parenta3e55481ef19dc83192f5c8190a6fd77685b33e8 (diff)
downloadpylint-8caf6b890b27e05d02ada2633fe518907a1ac950.tar.gz
Update the docstring a little bit.
-rw-r--r--pylint/checkers/base.py5
1 files 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):