-
Notifications
You must be signed in to change notification settings - Fork 110
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
Solve py312 warning on pkgutil.get_loader #7597
Conversation
Using importlib instead
b31e675
to
ec9caf0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7597 +/- ##
==========================================
+ Coverage 84.51% 85.22% +0.71%
==========================================
Files 388 388
Lines 23352 23355 +3
Branches 892 892
==========================================
+ Hits 19735 19904 +169
+ Misses 3510 3344 -166
Partials 107 107 ☔ View full report in Codecov by Sentry. |
@@ -59,7 +58,7 @@ | |||
from .workflow_job import ErtScriptLoadFailure, WorkflowJob | |||
|
|||
if TYPE_CHECKING: | |||
from importlib.abc import FileLoader | |||
pass |
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.
Instead of passing TYPE_CHECKING
, can we just remove it?
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.
ay yes, should have. Sorry I clicked the merge button too soon.
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.
LGTM! 🚢
Using importlib instead
Issue
Approach
Use
importlib.util.find_spec
When applicable