Docstrings should be forced to use triple quotes
Open
Nobody has claimed this yet.
F: docstrings
S: needs discussion
T: style
- Dominant language
- Python
- Stars
- 41.8k
- Forks
- 2.9k
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 9
Description
Operating system: Windows 10 Pro 1809 + WSL (Ubuntu 18.04.2 LTS)
Python version: 3.6.7
Black version: 19.0b3
Does also happen on master: yes (via online formatter)
Related: #144.
Even if #144 is not implemented, Black should update docstrings to be triple double quotes.
def foo():
"Hello"
pass
# formats to:
def foo():
"""Hello"""
pass
Thoughts?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Start by reproducing the example with Black 19.0b3 or the online formatter, then locate the docstring-formatting path; done means a one-line docstring is emitted with triple double quotes without changing its content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100