deptry icon indicating copy to clipboard operation
deptry copied to clipboard

Transitive dependency was reported as a missing dependency

Open Willa1228 opened this issue 1 year ago • 1 comments

Describe the bug

I encountered this problem while working on my project. Since the project dependencies are a bit too complicated, I tried a simpler case and still found an issue. if my project has a dependency on package A, which internally depends on package B, Deptry should recognize package B as a transitive dependency. However, it incorrectly reports package B as a missing dependency.

For example, in my requirements.txt, I have included flask-sqlalchemy, which depends on flask. When I run Deptry, it does not recognize that flask is installed as a dependency of flask-sqlalchemy. Consequently, when my project imports flask, Deptry reports an error stating that flask is not listed in the requirements.

To Reproduce

Steps to reproduce the behavior:

  1. add flask-sqlalchemy into my requirements
  2. import flask in my code
  3. deptry .

System [please complete the following information]:

  • OS: Mac OS
  • Language Version: Python 3.11

Willa1228 avatar Jul 30 '24 17:07 Willa1228