deptry icon indicating copy to clipboard operation
deptry copied to clipboard

deptry 0.17.0 does not recurse into subdirectories on Windows

Open szabi opened this issue 1 year ago • 1 comments

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 src does not scan any files
  • deptry src\<packagename> scans main.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

szabi avatar Jul 25 '24 12:07 szabi

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.

mkniewallner avatar Jul 27 '24 16:07 mkniewallner

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.

mkniewallner avatar Oct 11 '24 15:10 mkniewallner