-
-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Labels
Description
Warnings/errors with generic messages do not provide context for what in the code caused the error.
Specifically, I ran into it here:
_LOGGER.warning(f"Failed guarded type import with {exc!r}") |
I changed that log to also print guarded_code
and it helped a lot. But I really think it should reraise the exception with the guarded_code and then catch and log it here with additional context:
_resolve_type_guarded_imports(autodoc_mock_imports, obj) |