autoflake icon indicating copy to clipboard operation
autoflake copied to clipboard

Add support for config file

Open ljades opened this issue 6 years ago • 4 comments

Can we have the ability to set up a config in a setup.cfg (which also helps it run in tandem with flake8's configuration) for which parts of the autolinter we want to run by default?

ljades avatar Nov 05 '19 20:11 ljades

Hi @myint, thanks for this project!

I have just added it to my personal cookiecutter and came here to look for pyproject.toml support. Is this kind of support on your roadmap? If so, I could try my hand at a PR. I've never written a support for pyproject.toml but it seems like fun.

Thanks & have a great weekend

fbidu avatar Aug 23 '20 12:08 fbidu

Any update on this?

nameer avatar Dec 04 '21 17:12 nameer

There is a workaround: https://github.com/quwac/pyproject-autoflake

However, there doesn't appear to be a way to either pass args or use pyproject-autoflake with pre-commit: https://github.com/PyCQA/autoflake/blob/master/.pre-commit-hooks.yaml

qci-amos avatar May 04 '22 15:05 qci-amos

Support config in pyproject.toml is another option. Wondering if there is any update on this issue.

ChihweiLHBird avatar Jul 01 '22 17:07 ChihweiLHBird

Hi All, autoflake 1.5.0 now supports configuration via pyproject.toml or setup.cfg https://github.com/PyCQA/autoflake#configuration

ed-wright avatar Sep 16 '22 07:09 ed-wright

Oh I had missed this, @ed-wright thanks for bringing it up!

fsouza avatar Sep 16 '22 10:09 fsouza