psf/black

`# fmt: skip` doesn't work with multiline strings

Opened this issue · 0 comments

I found this while messing around with #4511

playground link

(
# fmt: skip
"""
"""
)

gives
Cannot parse: 2:0: EOF in multi-line string

playground link

(
# fmt: skip
"\
"
)

gives
Cannot parse: 2:0: "


This is not fixed by #4380


This is fixed by #3978, though that PR appears to be stalled.
With #3978 applied:

(
# fmt: skip
"""
"""
)

gives

(
    # fmt: skip
    """
"""
)
(
# fmt: skip
"\
"
)

gives

(
    # fmt: skip
    ""
)