sqlalchemyorg / zimports

Python import rewriter
MIT License
75 stars 6 forks source link

Possibility to retain `from module import x, y` permitted by PEP8 #3

Closed ashwinvis closed 5 years ago

ashwinvis commented 5 years ago

Would it be possible to retain the example in PEP8 as it is, perhaps optionally:

from subprocess import Popen, PIPE

and not breaking them up as:

from subprocess import Popen
from subprocess import PIPE
ashwinvis commented 5 years ago

Closing because isort seems to do what we need. Removing unused imports is done better by zimports of course, but is not usually needed.

zzzeek commented 5 years ago

I wrote zimports to do imports on one line, I've worked for years with imports that have tons of symbols all on one line and I've decided it's a mistake. They make git merges difficult, it makes linting difficult, they make readability difficult, etc.