You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there's an option to do this, I didn't find it.
I think it would be useful to have a configuration to skip over files that exclusively have imports in them (the same way __init__.py files can be excluded). Files like these are usually the result of template-code generation that have not yet had the full code be implemented, but the required imports are automatically placed before being used.
A practical use-case of this configuration is Django startapp. Using this django command will create a bunch of files with imports in them and no other code, that should be extended and completed. Using autoflake in-between implementations cause these other files to be unnecessarily wiped clean, leaving empty files behind. This is even a bigger problem if autoflake is running in CI/CD.
The text was updated successfully, but these errors were encountered:
PedroPerpetua
changed the title
[Ignore import-only files
[Feature request] Ignore import-only files
Feb 5, 2023
If there's an option to do this, I didn't find it.
I think it would be useful to have a configuration to skip over files that exclusively have imports in them (the same way
__init__.py
files can be excluded). Files like these are usually the result of template-code generation that have not yet had the full code be implemented, but the required imports are automatically placed before being used.A practical use-case of this configuration is Django startapp. Using this django command will create a bunch of files with imports in them and no other code, that should be extended and completed. Using autoflake in-between implementations cause these other files to be unnecessarily wiped clean, leaving empty files behind. This is even a bigger problem if autoflake is running in CI/CD.
The text was updated successfully, but these errors were encountered: