-
Notifications
You must be signed in to change notification settings - Fork 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
chore: remove safe_import
and all usages
#5139
Conversation
Pull Request Test Coverage Report for Build 5376570007
💛 - Coveralls |
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.
Almost good to go! 👍🏽 I have just one question about a case where I think the behavior changed.
@@ -62,6 +56,7 @@ def _estimate_extension(self, file_path: Path) -> str: | |||
:param file_path: the path to extract the extension from | |||
""" | |||
try: | |||
magic_import.check() |
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.
Previously, we were just logging a debug message if magic
could not have been imported, this will now probably raise an error - is this intended?
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.
Ah good point... I added it to the try-catch block but then I didn't catch the proper error 😅 I'll fix line 62 to catch this one too!
Co-authored-by: bogdankostic <[email protected]>
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.
🧹
Related Issues
Proposed Changes:
safe_import
and all its usages from the codebaseHow did you test it?
Notes for the reviewer
n/a
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.