You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't have a fix but here is a shorter example with the same behavior. This shows it's not related to line length limits. The issue feels similar to the recently fixed #3610
Raw Input
lambda_fields = {
# fmt: off
"a": "b", # c
# fmt: on
}
After formatting
lambda_fields = {
# fmt: off
"a": "b",
# c
# fmt: on
}
Describe the bug
Black doesn't fully honor #fmt:off on line before #fmt:on, it moves comments.
To Reproduce
Is formatted as
The # NOQA directive is dissociated from it's line on the last line. Causing Flake8 to fail.
If we invert lines, it works and the last line is not formatted :
Environment
The text was updated successfully, but these errors were encountered: