tui_typer_tutor
tui_typer_tutor.
Functions⚓︎
configure_runtime_type_checking_mode ⚓︎
configure_runtime_type_checking_mode()
Optionally configure runtime type checking mode globally.
Source code in tui_typer_tutor/__init__.py
def configure_runtime_type_checking_mode() -> None: # pragma: no cover
"""Optionally configure runtime type checking mode globally."""
rtc_mode = _RuntimeTypeCheckingModes.from_environment()
if rtc_mode is not _RuntimeTypeCheckingModes.OFF:
from beartype.roar import BeartypeClawDecorWarning # noqa: PLC0415
beartype_this_package(conf=BeartypeConf(
warning_cls_on_decorator_exception=(
None if rtc_mode is _RuntimeTypeCheckingModes.ERROR else BeartypeClawDecorWarning
),
))