feat: Add exclusion of modules during import time#242
feat: Add exclusion of modules during import time#242Czaki wants to merge 3 commits intothebjorn:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #242 +/- ##
==========================================
+ Coverage 73.72% 73.86% +0.14%
==========================================
Files 19 19
Lines 1926 1944 +18
Branches 359 363 +4
==========================================
+ Hits 1420 1436 +16
- Misses 399 400 +1
- Partials 107 108 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
|
Can you write a testcase that hits the excluded cache (https://app.codecov.io/gh/thebjorn/pydeps/pull/242?src=pr&el=tree#9bb30ac481a77ac543d7347a8122083e-R91)? |
Based on my analysis of the project, the import of the module that is excluded is obsolete. And breaking import on such a module speeds up the run of the program and allows avoiding RecursionError.
Note
Introduces pattern-based module exclusion in dependency discovery.
Excluderusing glob patterns (compiled to regex) with caching to determine excluded module namesMyModuleFindernow initializes anExcluderfromexcludesand aborts loads inload_moduleby raisingImportErrorfor excluded modulesexcludelist throughpy2deptoMyModuleFinder; minor formatting/whitespace tweaks inpy2depgraph.pyWritten by Cursor Bugbot for commit 020bd6c. This will update automatically on new commits. Configure here.