Docstring new line reformatting can violate line length constraint #2274
Labels
F: strings
Related to our handling of strings
R: duplicate
This issue or pull request already exists
T: bug
Something isn't working
Describe the bug
Removal of new line in docstrings can violate the line length constraint if the last line is within two characters of the max line length value.
To Reproduce Steps to reproduce the behavior:
Run black on the following code with the default line-length constraint of 88 characters.
Expected behavior
No reformatting is performed.
Actual behavior
The code is reformatted as shown below, which violates the max line length constraint.
In a CI setup with Flake8 running after black, Flake8 throws the following error:
Environment (please complete the following information):
Does this bug also happen on main?
Yes
Additional context
black 19.10b0 does not have this behavior.
This was reported in #1635 (comment).
The text was updated successfully, but these errors were encountered: