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
Sometimes we know that a particular import always has side effects and should never be removed. When running autoflake with --remove-all-unused-imports, there's not a way to say "everything except module X, Y and Z."
We can sprinkle # noqa around at each such sight, but I'm wondering if there would be appetite to support a flag like --never-remove or such (that's the inverse of --imports).
If there is some way to do this that I am unaware, please let me know and accept my apologies! If this is intentionally unsupported, that would also be helpful feedback. If this is of interest but just needs a contributor, I could take a look.
Thanks!
The text was updated successfully, but these errors were encountered:
I think this is reasonable. One question I have is whether you're using flake8 though? Just because we may be able to ignore it in autoflake, but if you're using flake8 it may still require the issue. Not sure if you care.
Sometimes we know that a particular import always has side effects and should never be removed. When running autoflake with
--remove-all-unused-imports
, there's not a way to say "everything except module X, Y and Z."We can sprinkle
# noqa
around at each such sight, but I'm wondering if there would be appetite to support a flag like--never-remove
or such (that's the inverse of--imports
).If there is some way to do this that I am unaware, please let me know and accept my apologies! If this is intentionally unsupported, that would also be helpful feedback. If this is of interest but just needs a contributor, I could take a look.
Thanks!
The text was updated successfully, but these errors were encountered: