PyCQA / flake8

flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code.
https://flake8.pycqa.org
Other
3.39k stars 306 forks source link

Docu: Lookup location for ".flake8" unclear #1909

Closed buhtz closed 8 months ago

buhtz commented 8 months ago

It is about the docu: https://flake8.pycqa.org/en/latest/user/configuration.html

The lookup location for the .flake8 config file is not clear specified in this text. I assume that flake8 do not look into home folder or /etc/..., right? It looks only in the projects root folder?

sigmavirus24 commented 8 months ago

What needs to be clearer about

Flake8 supports storing its configuration in your project in one of setup.cfg, tox.ini, or .flake8.

It's on the page you've linked. And below that is:

Project Configuration

Flake8 is written with the understanding that people organize projects into sub-directories. Let’s take for example Flake8’s own project structure

(Emphasis in these quotes is mine)

buhtz commented 8 months ago

What needs to be clearer about

Flake8 supports storing its configuration in your project in one of setup.cfg, tox.ini, or .flake8.

I think the point is that usually applications in the unix world do also look into the users and the global config folders. Flake8 seems to be an exception here. This should be stated. There is also a lot of outdated howto- and help-text in the internet that points to a flake8 file in the user config.

sigmavirus24 commented 8 months ago

Not in that exact section, but still in the documentation when you search for user configuration and XDG is https://flake8.pycqa.org/en/latest/release-notes/4.0.0.html#backwards-incompatible-changes

Why do we need to add an explicit call out here that we don't support things that we don't need to support? We're documenting how to use the tool, not inviting confusion (because I believe we had that callout in the docs before and people misunderstood it regardless as "I should be able to do this" instead of "This is not supported").