[refactor] Use ModuleNotFoundError
instead of ImportError
for consistency
#9556
Labels
ModuleNotFoundError
instead of ImportError
for consistency
#9556
Proposed refactoring or deprecation
[nitpicking] Both
ModuleNotFoundError
andImportError
are used in the codebase when users try to use extensions that require optional packages without them installed, but only one of the exceptions should be used for consistency.Do we use these exceptions differently depending on the situation? If not, we should consolidate them.
Occurences in the codebase
Additional context
FYI, https://docs.python.org/3/library/exceptions.html#ImportError
ImportError
ModuleNotFoundError
The text was updated successfully, but these errors were encountered: