-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
T: enhancementNew feature or requestNew feature or requestT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?help wantedExtra attention is neededExtra attention is needed
Description
This is a follow up of issue #148 (see in particular #148 (comment) by @njsmith)
Black still adds spaces around the operator **
.
It is really bad for readability of math formula and it is not consistent with PEP 8 (https://www.python.org/dev/peps/pep-0008/#other-recommendations).
This operator has a so high precedence (https://docs.python.org/3/reference/expressions.html#operator-precedence) so I think it should be allowed not to put spaces around it.
I know that we can use
# fmt: off
t = a**2 + b**3
# fmt: on
for math, but many times, the spaces around **
are the worst problems, so allowing a**2
would save us from adding too many # fmt: off ... # fmt: on
.
basnijholt, iago-lito, wis, yapici, jendrikseipp and 9 morebasnijholt
Metadata
Metadata
Assignees
Labels
T: enhancementNew feature or requestNew feature or requestT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?help wantedExtra attention is neededExtra attention is needed