Y
Hacker News
new
|
ask
|
show
|
jobs
by
jldugger
1517 days ago
I wonder if an autoformatter like black is at play here.
2 comments
saila
1517 days ago
Black doesn't split strings, and I doubt they'd choose to use concatenation if they did.
link
hathawsh
1517 days ago
I kind of wish Black would split and join literal strings. I've seen several times when Black converted code like this:
raise SomeError( "Explanation... " "yet more explanation" )
To this:
raise SomeError( "Explanation... " "yet more explanation" )
That just looks odd. Black is fantastic, but not perfect.
link
d0mine
1517 days ago
Black does split strings if configured and it does use implicit concatenation of Python string literals.
link
saila
1516 days ago
There's an experimental option for splitting long strings using the --preview flag, but it still seems to have some potential issues. That seems like it would be extremely hard to solve correctly.
link
xigoi
1517 days ago
Black doesn't change the semantics of code.
link