-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Can't use other comments after "# fmt: ..." (like "# noqa: ...") #2213
Comments
The same is true with |
I'm having this issue aswell, with |
Any workaround? same happen to me 😞 |
Try this # fmt: off
log.debug("Long debug message, so we ignore flake8's E501 long line message") # noqa: E501
# fmt: on |
Ik it works @seanbr76 , but seems too wordy to me. |
This only works for single cases. In my case, I have 7k lines in the code base that I am formatting which has |
This comment was marked as off-topic.
This comment was marked as off-topic.
Any progress on this? |
Friendly inquiry about the status of this much-welcome (and needed!) feature... any progress? This might be helpful: Pylint had similar issues a few years ago, and pylint-dev/pylint@daef49a and pylint-dev/pylint@b8f8c4a solved pylint-dev/pylint#2485 and others, allowing the pragma to begin or end with Maybe their implementation can inspire a PR for Black? |
Thanks @henriholopainen for the fix! |
Describe the bug
Hi, I am experiencing an issue with
# fmt: skip
. If I put it next to long line - this line will be skipped (as expected):But then flake8 will give me "E501 line too long" message, which I usually ignore with
# noqa: E501
comment, but using it together with# fmt: skip
is impossible, line below will be formatted:To Reproduce
Expected behavior
I expected
black
to handle it just asflake8
andbandit
, they for example detect everything properly if I put both# nosec # noqa
comments on the same line.Environment:
Does this bug also happen on main?
Yes, online formatter link
The text was updated successfully, but these errors were encountered: