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

[Feature request] Ignore import-only files #221

Open
PedroPerpetua opened this issue Feb 5, 2023 · 0 comments
Open

[Feature request] Ignore import-only files #221

PedroPerpetua opened this issue Feb 5, 2023 · 0 comments

Comments

@PedroPerpetua
Copy link

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.

@PedroPerpetua PedroPerpetua changed the title [Ignore import-only files [Feature request] Ignore import-only files Feb 5, 2023
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

1 participant