feat: allow single file to be used instead of directory#1414
feat: allow single file to be used instead of directory#1414tylerriccio33 wants to merge 8 commits intofpgmaas:mainfrom
Conversation
|
Anything I can do to push this along? |
|
I am not quite sure yet if this is useful enough for it to be merged to |
|
Occasionally I have other files commingled with the 'main' file. For example, I may have some builder scripts that construct metadata during the package build, but isn't actually required by the 'main' file. Sometimes I'll have a single 'main' file and a single test script. In those 2 cases I will import dev or build dependencies that aren't declared in the pyproject.toml file. As I say this out loud, maybe there's room to instead, discriminate between regular and dev deps? |
PR Checklist
docsis updatedDescription of changes
This PR allows a single file to be passed to deptry for analysis. I often find myself creating projects with a single file, and would love to use deptry to root out unused dependencies. I couldn't find a way to allow just a single file so I wrote this PR.
The changes are fairly straightforward, I intercept the single file at the rust level in
src/python_file_finder.rs. This could easily be done in python but I'd imagine the authors prefer a unified interface.Let me know what you think!
P.S. Initially marking this as draft since I had some OS related issues running functional tests. My M1 chip can be dicey...
Old Behavior:

New Behavior:
