I inherited a legacy code base that suddenly had a lot more attention on it and had to be rapidly overhauled. Deptry was invaluable for quickly removing a large amount of unused dependencies.
The newest update was a delightful surprise since deptry is now fast enough to run during automated pull-request analysis via GitHub actions
If I understand your question correctly; no, that is out of scope for deptry. Many of the dependency management tools already provide a way to do so, e.g. for PDM `pdm list --tree`.