This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Description
The expected behavior of 'python-isort:sortImports' is that it runs on the current editor's contents, using isort to directly convert text.
eg:
new_contents = SortImports(file_contents=old_contents).output
Instead, the sortImports function runs isort on 'getFilePath', which means that isort doesn't appear to do anything if the file has not been saved immediately before running sortImports.
I think it's probably bad form to directly edit the focused .py file, rather than changing the editor's contents, because it doesn't allow for the user to view and/or revert the changes that isort makes.
I'd be happy to update this behavior, if nobody else wants to.