File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ Changes:
24
24
25
25
* Report E402 for import statements not at the top of the file. (Issue #264)
26
26
27
+ * Do not enforce whitespaces around ``**`` operator. (Issue #292)
28
+
27
29
* Strip whitespace from around paths during normalization. (Issue #339 / #343)
28
30
29
31
* Update ``--format`` documentation. (Issue #198 / Pull Request #310)
Original file line number Diff line number Diff line change @@ -686,7 +686,7 @@ def missing_whitespace_around_operator(logical_line, tokens):
686
686
if need_space is True or need_space [1 ]:
687
687
# A needed trailing space was not found
688
688
yield prev_end , "E225 missing whitespace around operator"
689
- else :
689
+ elif prev_text != '**' :
690
690
code , optype = 'E226' , 'arithmetic'
691
691
if prev_text == '%' :
692
692
code , optype = 'E228' , 'modulo'
Original file line number Diff line number Diff line change 89
89
#:
90
90
91
91
#: E226
92
- z = 2 ** 30
92
+ z = 2 // 30
93
93
#: E226 E226
94
94
c = (a + b ) * (a - b )
95
95
#: E226
103
103
#: E226
104
104
c = (a + b )* (a - b )
105
105
#: E226
106
- def squares (n ):
107
- return (i ** 2 for i in range (n ))
106
+ def halves (n ):
107
+ return (i // 2 for i in range (n ))
108
108
#: E227
109
109
_1kB = _1MB >> 10
110
110
#: E227
@@ -129,7 +129,8 @@ def squares(n):
129
129
x = x * 2 - 1
130
130
hypot2 = x * x + y * y
131
131
c = (a + b ) * (a - b )
132
- _1MB = 2 ** 20
132
+ _1MiB = 2 ** 20
133
+ _1TiB = 2 ** 30
133
134
foo (bar , key = 'word' , * args , ** kwargs )
134
135
baz (** kwargs )
135
136
negative = - 1
@@ -140,15 +141,14 @@ def squares(n):
140
141
if not - 5 < x < + 5 :
141
142
print >> sys .stderr , "x is out of range."
142
143
print >> sys .stdout , "x is an integer."
143
- z = 2 ** 30
144
144
x = x / 2 - 1
145
145
146
146
if alpha [:- i ]:
147
147
* a , b = (1 , 2 , 3 )
148
148
149
149
150
150
def squares (n ):
151
- return (i ** 2 for i in range (n ))
151
+ return (i ** 2 for i in range (n ))
152
152
153
153
ENG_PREFIXES = {
154
154
- 6 : "\u03bc " , # Greek letter mu
You can’t perform that action at this time.
0 commit comments