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 has no opinion on the number of empty lines that may exist between the module's docstring and the first import line other than collapsing down to at-most-2. I'm proposing that Black should have an opinion, specifically that there should be none (in line with the general philosophy on empty lines).
Examples in the current Black style
All three examples are left unchanged by Black 23.9.1:
"""My super cool module"""from __future__ importannotationsdeffoo():
pass
"""My super cool module"""from __future__ importannotationsdeffoo():
pass
"""My super cool module"""from __future__ importannotationsdeffoo():
pass
Desired style
"""My super cool module"
from __future__ importannotationsdeffoo():
pass
Additional context
If there are no imports then Black currently enforces exactly two empty lines between the module docstring and the first line of code. If there's no docstring then Black strips all leading whitespace. I could see an argument that it should be two empty lines between the module docstring and the first import to match the former behaviour, but I think no lines fits better with the general philosophy of the Black style.
The text was updated successfully, but these errors were encountered:
Describe the style change
Currently Black has no opinion on the number of empty lines that may exist between the module's docstring and the first import line other than collapsing down to at-most-2. I'm proposing that Black should have an opinion, specifically that there should be none (in line with the general philosophy on empty lines).
Examples in the current Black style
All three examples are left unchanged by Black 23.9.1:
Desired style
Additional context
If there are no imports then Black currently enforces exactly two empty lines between the module docstring and the first line of code. If there's no docstring then Black strips all leading whitespace. I could see an argument that it should be two empty lines between the module docstring and the first import to match the former behaviour, but I think no lines fits better with the general philosophy of the Black style.
The text was updated successfully, but these errors were encountered: