Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Feed isort from stdin (#225) #281

Merged
merged 2 commits into from
Nov 3, 2020

Conversation

alexd2580
Copy link
Contributor

@alexd2580 alexd2580 commented Sep 19, 2020

With this PR isort will be fed the current buffer content from stdin.
Previously, when runnign isort the file content would be read from disc,
meaning that running it on a dirty buffer would break the edited file, since the
diff generated by isort would not match the file.
In the same fashion, running isort multiple times would also break the file.

By always feeding the current buffer content to isort, you get wysiwyg behavior.

This PR requires isort to be of version 5.5.2
For reference see: PyCQA/isort#1469

Closes #225

@alexd2580 alexd2580 changed the title Feed isort from stdin (Closes #225) Feed isort from stdin (Closes https://github.com/neoclide/coc-python/issues/225) Sep 19, 2020
@alexd2580 alexd2580 changed the title Feed isort from stdin (Closes https://github.com/neoclide/coc-python/issues/225) Feed isort from stdin (Closes neoclide/coc-python#225) Sep 19, 2020
@alexd2580 alexd2580 changed the title Feed isort from stdin (Closes neoclide/coc-python#225) Feed isort from stdin (Closes #225) Sep 19, 2020
@alexd2580 alexd2580 changed the title Feed isort from stdin (Closes #225) Feed isort from stdin (#225) Sep 19, 2020
@chemzqm chemzqm merged commit a9d7cfa into neoclide:master Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running python.sortImports multiple times breaks
2 participants