autopep8 icon indicating copy to clipboard operation
autopep8 copied to clipboard

setup.cfg documentation? support?

Open tony opened this issue 7 years ago • 5 comments

Hi there! Love the project!

It's not clear to me after #129 was closed, does autopep8 support setup.cfg at this point, via #167? Is there an example of it anywhere?

The reason why setup.cfg would be used / documented is there's a basis to rerun autopep8 across teams.

If it exists, I can't find the documentation. If it's documented, could you point me in the right direction?

Not something inferred / a separate config file (because the point of setup.cfg is the centralize the python configs). I'm looking for something like:

A setup.cfg file:

[autopep8]
select=E1,W1

If it's not documented, this issue can serve as the basis for a pull request to document it. If it doesn't exist, let this be a request for a setup.cfg style support, since other plugins (e.g pytest, flake8) are adopting this pattern.

tony avatar Jun 24 '18 22:06 tony

@tony

Sorry for late reply.

Configuration section in latest master. Could you look at this once? (can use setup.cfg. use pep8, pycodestyle and flake8 for section.)

hhatto avatar Oct 02 '18 15:10 hhatto

@hhatto Looking

Is this true as of flake8 3.5.0?

For consistency with what other projects are using: I think it could make sense to use 'autopep8' as a section name since these are configuring autopep8 (unless you have another arrangement with PyCQA).

At least in my current situation (hopefully I understand correctly), I try to keep linting rules (flake8) and formatting (autopep8, black, yapf) configs separate. Does that make sense?

tony avatar Oct 02 '18 15:10 tony

At least in my current situation (hopefully I understand correctly), I try to keep linting rules (flake8) and formatting (autopep8, black, yapf) configs separate. Does that make sense?

Also, I may be wrong! This is just what I (think?) I'm accustomed to.

tony avatar Oct 02 '18 15:10 tony

I also think that it would be better to use autopep8 as a section. I will also make autopep8 usable as a section name, so please wait a little more 🙏

hhatto avatar Oct 02 '18 15:10 hhatto

I also vote for an autopep8 section. In the same project, we are using flake8 and autopep8. However, there are some errors we want autopep8 to ignore but not for flake8 to ignore (specifically, E502). This is because we don't like the way autopep8 formats long lines. It would be great to allow for a set of overrides in the autopep8 section of the setup.cfg

matthewgrossman avatar Jan 24 '19 21:01 matthewgrossman