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

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

Issue 29602819: Issue 5844 - Detect (more) redundant parentheses (Closed) Base URL: https://hg.adblockplus.org/codingtools/
Patch Set: Updated flake8-eyeo/README.md and applied patches to existing codebase Created Jan. 25, 2018, 7:34 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
« no previous file with comments | « 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/A111.py
===================================================================
--- a/flake8-eyeo/tests/A111.py
+++ b/flake8-eyeo/tests/A111.py
@@ -10,6 +10,17 @@
else:
return
+ # * A111
+ for (a, b, c) in y:
+ # * A111
+ result = (a + b + c)
+ # * A111
+ return result or ('foo')
+
+ # A111
+ (a, b, c) = x
+ del a, b, c
+
def mandatory_parenthesis(x, y, z):
if ():
@@ -25,3 +36,11 @@
if (x or
y):
return
+
+
+def acceptable_parenthesis(x, y, z):
+ a = (x == y)
+ b = (x or y == z)
+ c = (x + y) / z
+ d = (x and y) or z
+ return (a, b, c, d)
« no previous file with comments | « flake8-eyeo/flake8_eyeo.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld