tbillington / kondo

Cleans dependencies and build artifacts from your projects.
MIT License
1.79k stars 51 forks source link

Fails to detect Python projects that don't have a `.py` file in their root #105

Open jwodder opened 10 months ago

jwodder commented 10 months ago

It appears that kondo (as of commit 69c153b) detects Python projects by looking for a file with a .py extension, at which point the directory in which this file is located is taken as the project root. However, this easily results in false negatives for modern Python packages, in which directories that need cleaning can be located above the directory of .py files.

Note the following about Python projects:

tbillington commented 10 months ago

Hmm, That's interesting, thank you for the context, I haven't done python in quite a while.

I have been working on a rework which allows easier use of more complicated project detection logic so this is a great example of what it would need to support.

jwodder commented 10 months ago

For the record, ALE (a Vim LSP plugin) detects Python project roots as described here:

https://github.com/dense-analysis/ale/blob/32ee7039d0ee7afcc134756cfac78678cffc7017/doc/ale-python.txt#L37-L69