Y
Hacker News
new
|
ask
|
show
|
jobs
by
saila
1514 days ago
Black doesn't split strings, and I doubt they'd choose to use concatenation if they did.
2 comments
hathawsh
1514 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
1514 days ago
Black does split strings if configured and it does use implicit concatenation of Python string literals.
link
saila
1513 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