Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any tool that autoformats multiple "from" imports according to PEP E401? #673

Open
ioudas opened this issue Feb 14, 2023 · 1 comment

Comments

@ioudas
Copy link

ioudas commented Feb 14, 2023

I'm surprised that no tool seems to regard this code as bad, since it makes git unnecessary conflicts:

from A import alpha, beta

This will create manual git conflicts for anyone changing the import.

Is there any tool that autoformats above code to:

from A import (alpha,
                beta)

Thanks for any tips

@asottile
Copy link
Contributor

asottile commented Mar 8, 2023

I wrote reorder-python-imports -- there's also settings for isort to do this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants