hooks.warnings module¶
Provides warning hooking functionality.
-
@
hooks.warnings.
WarningHook
[source]¶ Bases:
hooks.base._HookDecorator
Fired when a warning is encountered.
The decorated function is passed the following parameters when a warning is fired:
Parameters: from hooks.warnings import WarningHook @WarningHook def warning_callback(message, category, filename, lineno): # Code...
See also
-
hooks.warnings.
warning_hooks
¶ The singleton object of the
_WarningHooks
class.