Don't remove imports from __init__.py
See original GitHub issueA typical way to set up a project is to have the modules specify __all__
variables and then have the __init__.py
from .module_name import *
. This causes autoflake to remove all of the imports.
Please consider leaving the imports in __init__.py
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Don't remove imports from __init__.py · Issue #35 - GitHub
A typical way to set up a project is to have the modules specify __all__ variables and then have the __init__.py from .module_name...
Read more >python - Module imports and __init__.py - Stack Overflow
A better solution would be to remove the import from your __init__.py . As I said earlier, that may or may not make...
Read more >Understanding Python imports, __init__.py and pythonpath
The python interpreter tries to look for the directory containing the module we are trying to import in sys.path . It is a...
Read more >autoflake: Issue #35: Don't remove imports from __init__.py
Your task is to solve a 'medium' difficulty issue in the 'autoflake' project. Here is the issue: Issue #35 Don't remove imports from...
Read more >What's your opinion on what to include in __init__.py ? : r/Python
I'm talking about just reading code. If I've got a text editor I can track everything down so long as there aren't wildcard...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just a note, as I was having a similar issue and came here before but didn’t find this info.
You can exclude a single line adding a comment
# noqa
, like:I also submitted a PR adding that to the docs: https://github.com/myint/autoflake/pull/43
Working on this issue, may I be assigned to it? Thanks!