Module docstrings aren't formatted, unlike other docstrings · Issue #3493 · psf/black (original) (raw)
"""This is a module docstring.
"""
def func(): """This is a func docstring.
"""
is formatted to:
"""This is a module docstring.
"""
def func(): """This is a func docstring."""
From what I can tell, this is because is_docstring(leaf)
returns False
for the module doc here, so this looks like a bug, not an intentional design choice?