Operating system: Linux
Python version: 3.6
Black version: 18.6b4
Does also happen on master: yes
here's a POC:
x = 0 # this comment is so long that i am certain it will soon end up beyond the 88 character limit
reformatted code:
x = (
0
) # this comment is so long that i am certain it will soon end up beyond the 88 character limit
Not sure what is the desired result here, but this is certainly not it :) Probably just leave the line alone in case where the "multilining" doesn't help? There seems to be a behavior where simple assignment is left alone even if too long.
Similar thing happens when the assigned value is long and a relatively short comment pushes it over the edge.
OTOH what I'd actually want in this case is to keep the assignment but push the comment to the next line - or somewhere else. This is the wrong formatting result, but it does notify me that human intervention is needed, which is good.
Operating system: Linux
Python version: 3.6
Black version: 18.6b4
Does also happen on master: yes
here's a POC:
reformatted code:
Not sure what is the desired result here, but this is certainly not it :) Probably just leave the line alone in case where the "multilining" doesn't help? There seems to be a behavior where simple assignment is left alone even if too long.
Similar thing happens when the assigned value is long and a relatively short comment pushes it over the edge.
OTOH what I'd actually want in this case is to keep the assignment but push the comment to the next line - or somewhere else. This is the wrong formatting result, but it does notify me that human intervention is needed, which is good.