deptry
deptry copied to clipboard
Transitive dependency was reported as a missing dependency
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:
- add flask-sqlalchemy into my requirements
- import flask in my code
- deptry .
System [please complete the following information]:
- OS: Mac OS
- Language Version: Python 3.11