Skip to content

Wrong handling of EOF lines #11

@wookayin

Description

@wookayin

Upon Isort-ing the following buffer, a new line will be added near the EOF.

Before:

1 import os
2 import sys
3
4 def foo(a):
5     pass

After (see Line 7, a new blank line is added):

1 import os
2 import sys
3
4
5 def foo(a):
6     pass
7

Running isort from command-line doesn't have such issues: it correctly organizes import statements, but does not add any blank lines at the end of the file. I think updating the neovim buffer contents with isort output did not handle EOF properly.

I was using neovim 0.5.1 and isort 4.3.21.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions