Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

# fmt: skip failed to skip one-line format #3603

Open
WaveBird opened this issue Mar 13, 2023 · 0 comments
Open

# fmt: skip failed to skip one-line format #3603

WaveBird opened this issue Mar 13, 2023 · 0 comments
Labels
F: fmtskip fmt: skip implementation T: enhancement New feature or request

Comments

@WaveBird
Copy link

My environment is: python = 3.11.1, black = 23.1.0
the following is the info of commandpoetry show black:

 name         : black                              
 version      : 23.1.0                             
 description  : The uncompromising code formatter. 

dependencies
 - click >=8.0.0
 - mypy-extensions >=0.4.3
 - packaging >=22.0
 - pathspec >=0.9.0
 - platformdirs >=2

The code that black failed to skip:

join(
    packages,
    func.coalesce(orders.c.package_id, order_customer_types.c.package_id) == packages.c.id,  # fmt: skip
    isouter=True,
)

When I run black, I get this:

join(
    packages,
    func.coalesce(orders.c.package_id, order_customer_types.c.package_id)
    == packages.c.id,  # fmt: skip
    isouter=True,
)

But what I expect is black can skip formating the third line and keep it.

@WaveBird WaveBird added the T: enhancement New feature or request label Mar 13, 2023
@hauntsaninja hauntsaninja added the F: fmtskip fmt: skip implementation label Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: fmtskip fmt: skip implementation T: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants