-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
conftest: optimize _getconftestmodules #4103
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
Conversation
Codecov Report
@@ Coverage Diff @@
## features #4103 +/- ##
============================================
+ Coverage 94.37% 94.56% +0.18%
============================================
Files 109 109
Lines 23942 23943 +1
Branches 2363 2363
============================================
+ Hits 22596 22642 +46
+ Misses 1028 995 -33
+ Partials 318 306 -12
Continue to review full report at Codecov.
|
|
Not sure about the optimization (came up with this while debugging it). |
| if self._noconftest: | ||
| return [] | ||
|
|
||
| if path.isfile(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just use if/else to set directory instead of recursing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah.
Do you agree with the change in general though? (to only cache dirs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as far as i can tell it nicely trims down cache size and just makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, amended.
No description provided.