deptry
deptry copied to clipboard
deptry 0.17.0 does not recurse into subdirectories on Windows
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 scan any files.deptry srcdoes not scan any filesdeptry src\<packagename>scansmain.py, but does not scan those in the subdirs
=> 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]:
- OS: Windows 10
- Language Version: Python 3.10.11
- Poetry version: Poetry 1.8.2
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.
Going to close this one since I was not able to reproduce, and we don't have any feedback. If you are still affected and are able to give more details, feel free to add a comment, or create a new issue.