-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Avoid search paths for ImportChecker when possible #9595
Avoid search paths for ImportChecker when possible #9595
Conversation
If possible it is desirable to look for modules with no context file as it results in no search paths being given to astroid's find_spec(). This makes calls to it more uniform and opens up the possibility of effective caching. Refs pylint-dev#9310.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9595 +/- ##
=======================================
Coverage 95.81% 95.82%
=======================================
Files 173 173
Lines 18825 18831 +6
=======================================
+ Hits 18038 18044 +6
Misses 787 787
|
This comment has been minimized.
This comment has been minimized.
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.
Wonderful!
Let's shout about this in a changelog. There's a "performance" fragment type for this.
Also, do you agree this is enough to mark the linked issue as closed?
I think the cache is needed in astroid but from a pylint point of view then yes, this is probably all that can be done on pylint to fix the issue. |
bb3297b
to
ab5bafd
Compare
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit ab5bafd |
Great ! |
If possible it is desirable to look for modules with no context file as it results in no search paths being given to astroid's find_spec(). This makes calls to it more uniform and opens up the possibility of effective caching.
Refs #9310.
Type of Changes