neoclide / coc-python

Python extension for coc.nvim, fork of vscode-python
573 stars 51 forks source link

Feed isort from stdin (#225) #281

Closed alexd2580 closed 3 years ago

alexd2580 commented 3 years ago

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: https://github.com/PyCQA/isort/issues/1469

Closes https://github.com/neoclide/coc-python/issues/225