-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
T: enhancementNew feature or requestNew feature or requestT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?
Description
Operating system: Ubuntu 16.04
Python version: 3.6.1
Black version: master
Does also happen on master: yes
Hi,
currently Black doesn't seem to have an opinion about doc strings or rather where the quotes should go.
Black claims for this file for example that it is already formatted:
def test():
"""This is one possibility.
Very important stuff here.
"""
def test2():
"""This is another one possibility.
Very important stuff here."""
def test3():
"""
This is another one possibility.
Very important stuff here.
"""
def test4():
"""
What about this?
"""
def test5():
"""What about this?
Some people also like to have an empty line at the end of the doc string.
"""
The tool pydocstyle (in the spirit of PEP-0257) at least complains that the closing quotes should go on a separate line and if the docstring fits one line it should only span one line.
It would be nice if that could be incorporated in Black as well.
Thanks for the great work!
Lukas.
callmesangio, ambv, pawelad, erdnaxeli, MattAlp and 118 moressbarnea, andronat, snajder-r, carlodri, TylerYep and 3 more
Metadata
Metadata
Assignees
Labels
T: enhancementNew feature or requestNew feature or requestT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?