News for hackers. Stuff that matters.
Re:We fixed f-string typos in popular Python repos by jldugger on Friday April 29, 2022 @05:16PM (#31210661)
I wonder if an autoformatter like black is at play here.
Re:We fixed f-string typos in popular Python repos by saila on Friday April 29, 2022 @05:32PM (#31210798)
Black doesn't split strings, and I doubt they'd choose to use concatenation if they did.
Re:We fixed f-string typos in popular Python repos by hathawsh on Friday April 29, 2022 @07:11PM (#31211669)
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.
Re:We fixed f-string typos in popular Python repos by d0mine on Friday April 29, 2022 @10:53PM (#31212936)
Black does split strings if configured and it does use implicit concatenation of Python string literals.
Re:We fixed f-string typos in popular Python repos by saila on Sunday May 01, 2022 @12:44AM (#31222268)
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.
Re:We fixed f-string typos in popular Python repos by xigoi on Saturday April 30, 2022 @04:50AM (#31214438)
Black doesn't change the semantics of code.