Skip to content

brahmap.base.filter_warnings

Configures the global Python warning filter behavior for the framework.

Parameters:

Name Type Description Default
wfilter Literal['ignore', 'always']

The action to take when a warning is triggered. Use "ignore" to suppress warnings, or "always" to always print the warnings

required
Source code in brahmap/base/misc.py
def filter_warnings(wfilter: Literal["ignore", "always"]) -> None:
    """Configures the global Python warning filter behavior for the framework.

    Parameters
    ----------
    wfilter : Literal["ignore", "always"]
        The action to take when a warning is triggered. Use "ignore" to suppress
        warnings, or "always" to always print the warnings
    """
    warnings.simplefilter(wfilter)