def set_log_and_warnings_filters() -> None:
    '\n    Set log filters on the root logger, and duplicate filters for warnings.\n\n    Filters only propagate on handlers, not loggers.\n    '
    for handler in logging.getLogger().handlers:
        handler.addFilter(RepeatedLogFilter())
    warnings.filterwarnings('once', category=UserWarning)
Set log filters on the root logger, and duplicate filters for warnings.

Filters only propagate on handlers, not loggers.
def set_log_and_warnings_filters() -> None:
    '\n    Set log filters on the root logger, and duplicate filters for warnings.\n\n    Filters only propagate on handlers, not loggers.\n    '
    for handler in logging.getLogger().handlers:
        handler.addFilter(RepeatedLogFilter())
    warnings.filterwarnings('once', category=UserWarning)