py-doq icon indicating copy to clipboard operation
py-doq copied to clipboard

[feauture] Search pyproject.toml upward

Open Freed-Wu opened this issue 2 years ago • 3 comments

if a pyproject.toml exists in /the/path, and current directory is not /the/path, we doq -wf /the/path/src/a.py will fail. Why not search pyproject.toml upward from /the/path/src?

Freed-Wu avatar Oct 19 '23 16:10 Freed-Wu

@Freed-Wu Sorry for late response.

Ah, I did't notice this. Do you have any idea to search upward?

I hope there are no conflicts when the recursive option is given.

heavenshell avatar Dec 10 '23 14:12 heavenshell

Detect os.path.isfile("/the/path/src/pyproject.toml"), if not, detect os.path.isfile("/the/path/pyproject.toml"), ..., if os.path.isfile("/pyproject") is not, don't use pyproject.toml?

Freed-Wu avatar Dec 10 '23 17:12 Freed-Wu

Thanks, fumm. Let me think about it for a while.

heavenshell avatar Dec 11 '23 15:12 heavenshell