Wrong code formatting with negative numbers
Brought to you by:
fabioz
Hi,
if you code-format an expression like
dict(a="b", b=-1)
you get
dict(a="b", b= -1)
(space before "-1") which is "wrong" according to PEP8:
"""
- Don't use spaces around the '=' sign when used to indicate a
keyword argument or a default parameter value.
Yes:
def complex(real, imag=0.0):
return magic(r=real, i=imag)
No:
def complex(real, imag = 0.0):
return magic(r = real, i = imag)
"""