fpgmaas / deptry

Find unused, missing and transitive dependencies in a Python project.
https://deptry.com/
MIT License
833 stars 18 forks source link

deptry 0.17.0 does not recurse into subdirectories on Windows #775

Open szabi opened 1 month ago

szabi commented 1 month ago

Describe the bug

deptry does not seem to recurse into subdirectories, incontrast to the documentation's "Dependency issues are detected by scanning for imported modules within all Python files in a directory and its subdirectories,"

To Reproduce

On Windows 10, I installed deptry into the virtual environment used by the project by

poetry add --group dev deptry

and run it on our project, which has the following structure

$ROOT
 +--src
 |   `--<packagename>
 |       +--[subdirs with python files in it]
 |        `--main.py
 `--pyproject.toml

From $ROOT

=> deptry does not seem to recurse into subdirectories, at least on Windows.

Expected behavior

Scan all files, as described in the documentation

System [please complete the following information]:

mkniewallner commented 1 month ago

I've tried on my side on Windows with the structure you shared and was not able to reproduce, as files are correctly found.

Could you maybe add --verbose flag when running deptry and share the output (make sure to redact data you think is sensitive), or create a minimal git repository that reproduces the issue? That would help trying to reproduce the issue.