Open gav451 opened 1 year ago
So is there not a global flake8 configuration? Or is it not recommended?
No, contrary to pycodestyle, flake8 has no global configuration file (its removal gave rise to a lot of discussion, but now I think it was a wise decision). The simple function at https://github.com/PyCQA/flake8/blob/ff8988bd586a4af192390e4316772333f34ba1e5/src/flake8/options/config.py#L55 implements the configuration file policy of flake8.
Since, the flake8 design and coding look really clean, the PR may be as simple as importing this function into flake8_conf.py
to delegate the handling of this policy to flake8.
PS: Although I have succeeded in configuring my client for the pylsp flake8 plugin, I am still using pyls_flake8. The most important reason for this is the non-compliance with the configuration file policy of the flake8 plugin. However, pyls_flake8 is unmaintained and I like to stop using it.
No, contrary to pycodestyle, flake8 has no global configuration file
Ok, I see.
Since, the flake8 design and coding look really clean, the PR may be as simple as importing this function into flake8_conf.py to delegate the handling of this policy to flake8.
Sounds good to me. Please go ahead with the proposed changes then.
Hello, I traced failing test report below
back to the presence of a
~/.config/flake8
file that is picked up bypylsp/config/flake8_conf.py.
The patch below makes the test succeed because it excludes extra options picked up from the configuration file.However, according to the documentation section Flake8 Configuration Locations,
flake8
looks for its configuration files (setup.cfg, tox.ini, and .flake8) only in its project or workspace directory. I would expect thatpylsp
would do the same to ensure identical flake8 messages from the command line and the server. Do you think it is worthwhile to propose a PR implementing this policy?