You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, black preserves the blank line before regular doc strings, but not before raw docstrings. It should preserve them before both.
Input
classTextIOWrapper(TextIOBase):
r"""Character and line based layer over a BufferedIOBase object, buffer. [...] """_CHUNK_SIZE=2048classTextIOWrapper(TextIOBase):
"""Character and line based layer over a BufferedIOBase object, buffer. [...] """_CHUNK_SIZE=2048
Examples in the current Black style
classTextIOWrapper(TextIOBase):
r"""Character and line based layer over a BufferedIOBase object, buffer. [...] """_CHUNK_SIZE=2048classTextIOWrapper(TextIOBase):
"""Character and line based layer over a BufferedIOBase object, buffer. [...] """_CHUNK_SIZE=2048
Desired style
classTextIOWrapper(TextIOBase):
r"""Character and line based layer over a BufferedIOBase object, buffer. [...] """_CHUNK_SIZE=2048classTextIOWrapper(TextIOBase):
"""Character and line based layer over a BufferedIOBase object, buffer. [...] """_CHUNK_SIZE=2048
Additional context
Currently, black doesn't seem to consider raw triple quotes strings as docstrings, even though cpython (and PEP 257) do. I've seen some raw triple quoted doc string uses in the wild, such as the above example from cpython.
The text was updated successfully, but these errors were encountered:
We should actually remove both blank lines: we do that in #3692 (currently only in the preview style). Agree that we should treat raw strings like docstrings too.
Describe the style change
Currently, black preserves the blank line before regular doc strings, but not before raw docstrings. It should preserve them before both.
Input
Examples in the current Black style
Desired style
Additional context
Currently, black doesn't seem to consider raw triple quotes strings as docstrings, even though cpython (and PEP 257) do. I've seen some raw triple quoted doc string uses in the wild, such as the above example from cpython.
The text was updated successfully, but these errors were encountered: