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:
2424
2525* Report E402 for import statements not at the top of the file. (Issue #264)
2626
27+ * Do not enforce whitespaces around ``**`` operator. (Issue #292)
28+
2729* Strip whitespace from around paths during normalization. (Issue #339 / #343)
2830
2931* Update ``--format`` documentation. (Issue #198 / Pull Request #310)
Original file line number Diff line number Diff line change @@ -688,7 +688,7 @@ def missing_whitespace_around_operator(logical_line, tokens):
688688 if need_space is True or need_space [1 ]:
689689 # A needed trailing space was not found
690690 yield prev_end , "E225 missing whitespace around operator"
691- else :
691+ elif prev_text != '**' :
692692 code , optype = 'E226' , 'arithmetic'
693693 if prev_text == '%' :
694694 code , optype = 'E228' , 'modulo'
Original file line number Diff line number Diff line change 8989#:
9090
9191#: E226
92- z = 2 ** 30
92+ z = 2 // 30
9393#: E226 E226
9494c = (a + b ) * (a - b )
9595#: E226
103103#: E226
104104c = (a + b )* (a - b )
105105#: 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 ))
108108#: E227
109109_1kB = _1MB >> 10
110110#: E227
@@ -129,7 +129,8 @@ def squares(n):
129129x = x * 2 - 1
130130hypot2 = x * x + y * y
131131c = (a + b ) * (a - b )
132- _1MB = 2 ** 20
132+ _1MiB = 2 ** 20
133+ _1TiB = 2 ** 30
133134foo (bar , key = 'word' , * args , ** kwargs )
134135baz (** kwargs )
135136negative = - 1
@@ -140,15 +141,14 @@ def squares(n):
140141if not - 5 < x < + 5 :
141142 print >> sys .stderr , "x is out of range."
142143print >> sys .stdout , "x is an integer."
143- z = 2 ** 30
144144x = x / 2 - 1
145145
146146if alpha [:- i ]:
147147 * a , b = (1 , 2 , 3 )
148148
149149
150150def squares (n ):
151- return (i ** 2 for i in range (n ))
151+ return (i ** 2 for i in range (n ))
152152
153153ENG_PREFIXES = {
154154 - 6 : "\u03bc " , # Greek letter mu
You can’t perform that action at this time.
0 commit comments