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

Do not reformat code lines that end with # fmt: skip #182

Closed
superDross opened this issue Jan 24, 2022 · 1 comment · Fixed by #183
Closed

Do not reformat code lines that end with # fmt: skip #182

superDross opened this issue Jan 24, 2022 · 1 comment · Fixed by #183

Comments

@superDross
Copy link
Contributor

Description

There is currently no way to tell both black and autoimport to ignore formatting a line.

This can be an issue when using black along with autoimport but wanting both formatters to ignore a debugger line.

The # noqa: autoimport is not recognised by black, so the current implementations does not suffice.

Black uses # fmt: skip as an instruction to not format a line.

Possible Solution

We can utilise this same marker to ensure neither autoimport or black format a given line.

@lyz-code
Copy link
Owner

Available since 1.0.4 thanks for the implementation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants