echo -e 'import sys\nimport os' | isort - --diff
got sorted output (no diff)
import os
import sys
Show diff like isort 4.x.x
--- :before 2020-09-10 12:27:51.648963
+++ :after 2020-09-10 12:27:51.648976
@@ -1,2 +1,2 @@
+import os
import sys
-import os
5.5.1
Thanks for reporting this issue!
I've pushed out a hot-fix release that resolves it and adds an additional test case to hopefully keep the regression from coming back. This can be downloaded from PyPI as version 5.5.2
Thanks!
~Timothy
5.5.2 solved the issue. Thank you.
@timothycrosley Thanks for the quick fix! Nothing was working for me when upgrading isort to 5.5.1 myself. It seems isort when run from stdin keep regressing. https://github.com/PyCQA/isort/issues/1447 https://github.com/PyCQA/isort/issues/1469 I remember atleast one more.
Do we not have the same dedicated test cases when isort is run from stdin as we have when it's run normally?
@karrtikr I was thinking the same thing! There are tests for stdin, but they are clearly inadequate at the moment. I've added an additional ticket here to track the creation of a more robust test suite for stdin based usage https://github.com/PyCQA/isort/issues/1472
Thanks! That'll help
Most helpful comment
Thanks for reporting this issue!
I've pushed out a hot-fix release that resolves it and adds an additional test case to hopefully keep the regression from coming back. This can be downloaded from PyPI as version 5.5.2
Thanks!
~Timothy