Docstring reformatting causes line to be too long #3331
Labels
F: docstrings
How we format docstrings
R: outdated
Resolved or not relevant anymore.
T: bug
Something isn't working
Describe the bug
Black is overzealous about reformatting docstrings to a single line, and can cause the resulting line to be longer than the line length limit.
To Reproduce
For example, take this code:
The first line of this docstring is exactly 88 characters. After blackening this code, this results in:
The line is now 91 characters, and flake8 complains.
Expected behavior
Honestly, I wouldn't expect black to reformat docstrings at all. But I definitely wouldn't expect it to reformat to the point where style-compliant code becomes non-style-compliant.
Environment
Additional context
This appears to be a regression of the same bug reported in #1632 and #2274.
The text was updated successfully, but these errors were encountered: