roboto.warnings#
Module Contents#
- exception roboto.warnings.ExperimentalWarning#
Bases:
WarningWarning category for experimental APIs.
- roboto.warnings.experimental(target: _C, /) _C#
- roboto.warnings.experimental(target: _F, /) _F
- roboto.warnings.experimental(target: str, /) Callable[[_T], _T]
- roboto.warnings.experimental(*, message: str) Callable[[_T], _T]
Mark a class, function, or method as experimental.
Experimental APIs may be incomplete, subject to change, or removed without notice.
Prepends a
.. warning::notice to the target’s docstring, so documentation rendered from it andhelp()show the target as experimental, then returns the target itself.Can be used in three ways:
@experimental def my_function(): ... @experimental("Custom message about this API.") def my_function(): ... @experimental(message="Custom message about this API.") def my_function(): ...
- Parameters:
target – The object to mark when applied as
@experimental, or the notice text when called as@experimental("...").message – The notice text. Defaults to “<qualified name of the target> is experimental and may change or be removed without notice.”
- Raises:
TypeError – The target is not callable, as when the decorator is placed above
@propertyor@classmethodand not below it.
- roboto.warnings.roboto_default_warning_behavior()#