Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: flake8-eyeo/tests/A208.py

Issue 29634555: NoIssue - Detect redundant comparisons Base URL: https://hg.adblockplus.org/codingtools
Patch Set: Created Dec. 10, 2017, 6:10 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« flake8-eyeo/flake8_eyeo.py ('K') | « flake8-eyeo/flake8_eyeo.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: flake8-eyeo/tests/A208.py
===================================================================
new file mode 100644
--- /dev/null
+++ b/flake8-eyeo/tests/A208.py
@@ -0,0 +1,17 @@
+a = b = c = 1
+
+# * A208
+if a == 1 or a == 2:
+ print(a)
+
+# * A208
+if b == a or a == c:
+ print(a)
+
+# * A208
+if a != 1 or 2 != a:
Sebastian Noack 2017/12/10 23:19:57 This expression will always evaluate to True. I su
+ print(a)
+
+# * A208
+if b != a or c != a:
+ print(a)
« flake8-eyeo/flake8_eyeo.py ('K') | « flake8-eyeo/flake8_eyeo.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld