Please sign in to comment.
RF: use isinstance instead of type().__name__ comparison
ModuleNotFoundError is a subclass of ImportError: https://docs.python.org/3/library/exceptions.html#exception-hierarchy so we can safely check via isinstance. Moreover, it seems that whenever exception is raised without explicit instantiation (raise ImportError), we do catch an instance, so should work fine
- Loading branch information...