pylint icon indicating copy to clipboard operation
pylint copied to clipboard

Looking for configuration files like ``pylintrc`` or ``pyproject.toml`` in parent directories like ``black`` or ``isort``

Open rrauenza opened this issue 4 years ago • 5 comments

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.

rrauenza avatar Dec 04 '19 18:12 rrauenza

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.

PCManticore avatar Dec 12 '19 15:12 PCManticore

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

michael-k avatar Dec 16 '19 12:12 michael-k

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.

AWhetter avatar Jan 30 '20 00:01 AWhetter

Any plan to support this feature?

dclong avatar Dec 31 '20 18:12 dclong

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.

MrAlexBailey avatar Dec 10 '21 20:12 MrAlexBailey