warnings.exceptions
warnings.exceptions
Warning-style configuration for spotforecast2.
Warning and error classes live in spotforecast2_safe.exceptions; this module imports them only to wire up the skforecast-style warning formatters and to install the warning style on import. Consumers that need a warning class should import it from its real home.
Examples
Using a safe-package warning::
import warnings
from spotforecast2_safe.exceptions import MissingValuesWarning
# Raise a warning
warnings.warn(
"Missing values detected in input data.",
MissingValuesWarning
)
# Suppress a specific warning
warnings.simplefilter('ignore', category=MissingValuesWarning)