from base import ( # one
# two
a, # three
b # four
# five
) # six
Repro:
(venv) amethyst@luxray ~/scratch/usort-bug » usort diff source.py
--- a/source.py
+++ b/source.py
@@ -1,7 +1,2 @@
-from base import ( # one
- # two
- a, # three
- b # four
- # five
-) # six
+from base import a, b # one # two # three # five # six
With line-length=20 to prevent collapsing to single line:
(venv) amethyst@luxray ~/scratch/usort-bug » usort diff source.py
--- a/source.py
+++ b/source.py
@@ -1,7 +1,7 @@
from base import ( # one
# two
a, # three
- b # four
+ b,
# five
) # six
Note that in both cases, comment # four is dropped from the final result.
Source file:
Repro:
With
line-length=20
to prevent collapsing to single line:Note that in both cases, comment
# four
is dropped from the final result.