Describe the bug A clear and concise description of what the bug is.
Black changes docstring quotes from ''' to """ for multiline docstrings when using --skip-string-normalization
To Reproduce Steps to reproduce the behavior:
def a():
'''The function a'''
return 'a'
def b():
'''
The function b requires more words in the docstring
and as such uses a slightly different format.
'''
return 'b'
def c():
'''The function c requires more words in the docstring
but lines are expensive.'''
return 'c'
def d():
'''
The function d requires more words in the docstring
and does not know how to be consistent.'''
return 'd'
def e():
'''The function e requires more words in the docstring
and is confused by d.
'''
return 'e'
def a():
'''The function a'''
return 'a'
def b():
"""
The function b requires more words in the docstring
and as such uses a slightly different format.
"""
return 'b'
def c():
"""The function c requires more words in the docstring
but lines are expensive."""
return 'c'
def d():
"""
The function d requires more words in the docstring
and does not know how to be consistent."""
return 'd'
def e():
"""The function e requires more words in the docstring
and is confused by d.
"""
return 'e'
Expected behavior A clear and concise description of what you expected to happen.
Without string normalization the file should not have changed.
Environment (please complete the following information):
black, version 20.8b1macOS 10.15.7 (19H2), Python 3.8.5Does this bug also happen on master? To answer this, you have two options:
Additional context Add any other context about the problem here.
Yeah this was fixed by commit https://github.com/psf/black/commit/7fe19fac5bccc08dbcf21c293ab50f1fcda7716f, but the fix hasn't been shipped in any releases yet.
Most helpful comment
Yeah this was fixed by commit https://github.com/psf/black/commit/7fe19fac5bccc08dbcf21c293ab50f1fcda7716f, but the fix hasn't been shipped in any releases yet.