Hacker News new | ask | show | jobs
by progval 1596 days ago
isort also kind of has this bad behavior when using 'import as':

    $ cat foo.py 
    from x import a, b, d, e
    from x import c as C

    $ isort foo.py 
    Fixing /tmp/foo.py

    $ cat foo.py 
    from x import a, b
    from x import c as C
    from x import d, e
1 comments

This is something µsort actually gets right:

    $ usort diff foo.py
    --- a/foo.py
    +++ b/foo.py
    @@ -1,2 +1 @@
    -from x import a, b, d, e
    -from x import c as C
    +from x import a, b, c as C, d, e
https://usort.readthedocs.io