-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: find Python files in Rust #591
feat: find Python files in Rust #591
Conversation
d7909a0
to
fe5cdb3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #591 +/- ##
=======================================
- Coverage 91.3% 90.0% -1.4%
=======================================
Files 34 33 -1
Lines 996 951 -45
Branches 202 191 -11
=======================================
- Hits 910 856 -54
- Misses 69 78 +9
Partials 17 17 ☔ View full report in Codecov by Sentry. |
28492a6
to
e87980a
Compare
c49a62c
to
3113e5b
Compare
3113e5b
to
8fd8a07
Compare
Looks good! I see that the verbose logging has become a bit more verbose:
Do we want that level of detail exposed to the user in the verbose logging? |
Unfortunately I don't think there's a way to control that, at least not easily. Setting |
PR Checklist
docs
is updatedDescription of changes
Leverage Rust to find Python files by using https://crates.io/crates/ignore. The crate provides similar options to https://pypi.org/project/pathspec/ in order to handle
.gitignore
while also handling files walking. For the exclusion, theregex
crate that we already depend on is used, to match the behaviour we have with the Python implementation. At some point, although this would be a breaking change, I would really like to move to globsets instead of regexes.In terms of performance, testing the changes on a repository with ~7k files shows a 27% speedup, dropping from 1.43s to 1.04s.