isort icon indicating copy to clipboard operation
isort copied to clipboard

`lines_before_import` adds newlines above module's docstring when used with `float_to_top`

Open gbolmier opened this issue 3 years ago • 0 comments

Using MacOS, python 3.7.11, isort 5.10.1, and the following config in pyproject.toml:

[tool.isort]
lines_before_imports = 1
float_to_top = true

Before running isort tmp.py:

"""
Tmp module.
"""
import os
os.getcwd()

After:

  
"""
Tmp module.
"""

import os

os.getcwd()

(note the added leading empty line)

gbolmier avatar May 13 '22 14:05 gbolmier