pylint
pylint copied to clipboard
Looking for configuration files like ``pylintrc`` or ``pyproject.toml`` in parent directories like ``black`` or ``isort``
Is your feature request related to a problem? Please describe
I use pylint in vi with a pyproject.toml -- pyproject.toml isn't always in my $CWD.
Describe the solution you'd like
What do you think about also looking at ../../.. recursively like you do the .pylintrc?
Additional context
You might want to exclude setup.cfg from this for backwards compatibility.
Thanks for the report. I'm not entirely sure what this would entail in terms of UX, we'll need to investigate a little bit what other tools are doing.
we'll need to investigate a little bit what other tools are doing.
Here's what black is doing: https://github.com/psf/black#where-black-looks-for-the-file
I think it's reasonable to look for a pyproject.toml
at least until there's a .git
/.hg
directory.
And “isort will look up to 25 directories up, from the file it is ran against, to find a project specific configuration.” https://github.com/timothycrosley/isort#configuring-isort
Looking for a .git/.hg directory seems reasonable to me. I did think about looking for other project files that usually live at the root, but most a redundant now because they have been merged into pyproject.toml.
Any plan to support this feature?
This would be a great feature to have, black's implementation of searching up the tree until it hits a pyproject.toml
or .git
/ .hg
directory works really well.