Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding import messes up module's docstring #1444

Closed
MatejNikl opened this issue Sep 1, 2020 · 1 comment · Fixed by #1451
Closed

Adding import messes up module's docstring #1444

MatejNikl opened this issue Sep 1, 2020 · 1 comment · Fixed by #1451
Labels
bug Something isn't working

Comments

@MatejNikl
Copy link

Have a blank line before the module's docstring (disregard the invisible character, I wasn't able to produce an empty first line in the code block without it):

 
"""module docstring"""

running isort -a "import os" file.py modifies it to:

 
import docstring"""
import os"""module

Am I doing something wrong or is this a bug?
isort==5.4.2

@timothycrosley
Copy link
Member

A fix for this issue has just been deployed to PyPI in version 5.5.0 of isort.

Thanks!

~Timothy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants