-
Notifications
You must be signed in to change notification settings - Fork 24
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
Flag to skip for __init__.py
files
#226
Comments
Hi @ErikBjare thanks for taking the time to open not only an issue but also for making the PR. I'm fine with merging it but just a question. If you do imports in I guess there are more keystrokes for the same result, although for me it adds clarity. BTW, it's an honor to have your name under the contributors of the project, I |
feat: added --ignore-init-modules flag (fixes #226)
Available since |
Thanks for the swift merge!
Yeah, didn't think of that as a workaround, but I almost never use
Yay, that makes me happy. Thank you ❤️ |
Since
__init__.py
files tend to have "unused" imports, autoimport will happily remove them.This is fine if the script is run from somewhere where we can easily filter out the
__init__.py
(like in a Makefile), but becomes unwieldy when run through "fix-on-save" in your editor.autoflake
has solved the same problem with a--ignore-init-module-imports
flag, perhaps we could add the same to autoimport?Edit: should've opened this as a feature request, sry.
The text was updated successfully, but these errors were encountered: