With default settings only float-to-top enabled, imports end up getting placed above a module's docstring.
For example, I don't expect the following code block to change when I run isort over it with float-to-top enabled.
"""I'm a module-level docstring."""
import this
However, the code snippet will be reformatted with the import above the docstring.
import this
"""I'm a module-level docstring."""
Single-line comments starting with a # appear to be unaffected and will remain at the top, so shebangs and encoding comments are safe.
Is this intentional behavior? If so, is there any way to disable this?
Thank you!
With default settings only float-to-top enabled, imports end up getting placed above a module's docstring.
For example, I don't expect the following code block to change when I run
isortover it with float-to-top enabled.However, the code snippet will be reformatted with the import above the docstring.
Single-line comments starting with a
#appear to be unaffected and will remain at the top, so shebangs and encoding comments are safe.Is this intentional behavior? If so, is there any way to disable this?
Thank you!