-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fix circular imports during loader registration #911
base: main
Are you sure you want to change the base?
Conversation
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.
Can you diagnose the root cause of the circular import? Because this seems to have always worked fine, so the PR title is not necessarily correct. This is bypassing the circular import issue with moving all Target
imports to type checking.
from dissect.target.target import Target | ||
|
||
if TYPE_CHECKING: | ||
from dissect.target import Target |
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.
from dissect.target import Target | |
from dissect.target.target import Target |
I'd make it the full import everywhere.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #911 +/- ##
==========================================
- Coverage 76.65% 76.60% -0.05%
==========================================
Files 316 316
Lines 27101 27140 +39
==========================================
+ Hits 20774 20791 +17
- Misses 6327 6349 +22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Erik Schamper <[email protected]>
(DIS-3463)
Fixes #910