Skip to content

Preview style fix_fmt_skip_in_one_liners does not work for semi-colon separated statements in body of compound statement #4783

@dylwil3

Description

@dylwil3

While Black leaves the following unchanged under preview:

if True: print("this") # fmt: skip

and the following unchanged even without preview:

print("this"); print("that") # fmt: skip

it does not seem to leave the combination of these unchanged - see below.

Black 314f8c

Playground link

Options

--line-length=88
--safe
--preview

Input

if True: print("this"); print("that") # fmt: skip

Output

if True:
    print("this"); print("that") # fmt: skip

Expected

if True: print("this"); print("that") # fmt: skip

Metadata

Metadata

Assignees

No one assigned

    Labels

    F: fmtskipfmt: skip implementationT: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions