string_processing: makes it impossible to use a comment to ignore a static type violation #3802
Labels
C: preview style
Issues with the preview and unstable style. Add the name of the responsible feature in the title.
F: strings
Related to our handling of strings
T: bug
Something isn't working
Describe the bug
Black's
--preview
mode makes it impossible to suppress a type error in a string with a long comment.To Reproduce
For example, take this code:
And run it with these arguments:
The resulting error is:
If I move the comment to the middle line,
black
moves it back up to the top.Expected behavior
Even if
black
breaks my comment in some cases, there should be at least one possible place for me to leave the comment that will suppress my type error withoutblack
moving it.Environment
23.7.0
Additional context
This also occurs if the comment starts on the line with the violation
The text was updated successfully, but these errors were encountered: