Zac-HD / shed

`shed` canonicalises Python code. Shed your legacy, stop bikeshedding, and move on. Black++
https://pypi.org/project/shed/
GNU Affero General Public License v3.0
343 stars 23 forks source link

Shed requires two passes when removing imports makes it possible to put them on one line #75

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

Input:

from os import (
    wait,
    wait3,
    wait4,
    waitid,
    waitid_result,
    waitpid,
    waitstatus_to_exitcode,
    walk,
    write,
    writev,
)

print(
    waitpid,
    waitstatus_to_exitcode,
    walk,
    write,
    writev,
)

First pass:

from os import (
    waitpid,
    waitstatus_to_exitcode,
    walk,
    write,
    writev,
)

print(
    waitpid,
    waitstatus_to_exitcode,
    walk,
    write,
    writev,
)

second pass:

from os import waitpid, waitstatus_to_exitcode, walk, write, writev

print(
    waitpid,
    waitstatus_to_exitcode,
    walk,
    write,
    writev,
)

Quite irritating :unamused:

Zac-HD commented 1 year ago

Fixed by #82 (github syntax magic just missed it)

jakkdl commented 1 year ago

:tada: