autoflake8 icon indicating copy to clipboard operation
autoflake8 copied to clipboard

Allow to use as a Python package in addition to the standalone mode

Open metopa opened this issue 2 years ago • 2 comments

isort can be imported as a package and then work on the given file or code (see docs). It would be very convenient to have the similar feature for autoflake8

metopa avatar Apr 18 '22 19:04 metopa

@metopa would an API similar to isort's be enough for you?

i.e.:

import autoflake8

autoflake8.file("pythonfile.py")
code = autoflake8.code("import a\nimport b\n\nprint(b.x)")

fsouza avatar Apr 18 '22 19:04 fsouza

Yep 👌 Plus, all configuration can be specified as function parameters

metopa avatar Apr 19 '22 08:04 metopa