-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
F: linetoolongBlack makes our lines too longBlack makes our lines too longF: stringsRelated to our handling of stringsRelated to our handling of stringsT: bugSomething isn't workingSomething isn't working
Description
Describe the bug When there's a docstring that's near the max line length with the """ on the next line, the new version of Black moves the """ to the first line, making the line too long.
To Reproduce Steps to reproduce the behavior:
-
Create a file with this content:
def my_func(): """Remove punctuation and return cleaned string plus its length in tokens. """ pass -
Reformat it
-
Note that it now has the docstring on one line and that that line has 82 chars:
def my_func(): """Remove punctuation and return cleaned string plus its length in tokens.""" pass
Expected behavior
The docstring shouldn't get wrapped.
Environment (please complete the following information):
-
Version: [e.g. master] 20.8b1
-
OS and Python version:
Linux/Python 3.8.2
Does this bug also happen on master? To answer this, you have two options:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
F: linetoolongBlack makes our lines too longBlack makes our lines too longF: stringsRelated to our handling of stringsRelated to our handling of stringsT: bugSomething isn't workingSomething isn't working