diff options
author | Tim Leslie <timl@breakawayconsulting.com.au> | 2012-08-20 16:02:05 +1000 |
---|---|---|
committer | Tim Leslie <timl@breakawayconsulting.com.au> | 2012-08-20 16:02:05 +1000 |
commit | a589dcea61e6fbb5b7f71501bff4701887a6ec0d (patch) | |
tree | 277b3c33142b0c6faf9513b0b4b4616242d1fa4f /testsuite | |
parent | 7f2d5a3f561d48864211642097f05c6a5d2c2a55 (diff) | |
download | pep8-a589dcea61e6fbb5b7f71501bff4701887a6ec0d.tar.gz |
Add optional surrounding whitespace to high precedence mathematical operators (*, **, /, //). Addresses issue #96
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/E21.py | 3 | ||||
-rw-r--r-- | testsuite/E22.py | 11 |
2 files changed, 4 insertions, 10 deletions
diff --git a/testsuite/E21.py b/testsuite/E21.py index 2280caf..e830895 100644 --- a/testsuite/E21.py +++ b/testsuite/E21.py @@ -4,9 +4,6 @@ spam (1) dict ['key'] = list [index] #: E211 dict['key'] ['subkey'] = list[index] -#: E225 -def squares(n): - return (i**2 for i in range(n)) #: Okay spam(1) dict['key'] = list[index] diff --git a/testsuite/E22.py b/testsuite/E22.py index a6916ff..0583e68 100644 --- a/testsuite/E22.py +++ b/testsuite/E22.py @@ -51,14 +51,8 @@ i=i+1 #: E225 submitted +=1 #: E225 -x = x*2 - 1 -#: E225 -hypot2 = x*x + y*y -#: E225 c = (a+b) * (a-b) #: E225 -c = (a + b)*(a - b) -#: E225 c = (a +b)*(a - b) #: E225 c =-1 @@ -69,15 +63,18 @@ z = (x + 1) **y #: E225 norman = True+False #: E225 -_1MB = 2 ** 20 _1kB = _1MB >>10 #: #: Okay i = i + 1 submitted += 1 x = x * 2 - 1 +x = x*2 - 1 hypot2 = x * x + y * y +hypot2 = x*x + y*y c = (a + b) * (a - b) +c = (a + b)*(a - b) +_1MB = 2 ** 20 foo(bar, key='word', *args, **kwargs) baz(**kwargs) negative = -1 |