When the import blocks don't exist, docformatter formats 2 blank lines to 1.
How to reproduce
Crate test.py:
"""Module docstring."""
class Foo:
"""Foo class."""
And run docformatter:
$ docformatter --diff test.py
--- before/test.py
+++ after/test.py
@@ -1,5 +1,4 @@
"""Module docstring."""
-
class Foo:
"""Foo class."""
After formatting by docstring, Ruff (and Black) fixes it to 2 lines.
PEP 8 – Style Guide for Python Code | peps.python.org
Surround top-level function and class definitions with two blank lines.
I tested docformatter v1.7.8
When the import blocks don't exist, docformatter formats 2 blank lines to 1.
How to reproduce
Crate test.py:
And run docformatter:
After formatting by docstring, Ruff (and Black) fixes it to 2 lines.
PEP 8 – Style Guide for Python Code | peps.python.org
I tested docformatter v1.7.8