diff --git a/src/pandas_profiling/compare_reports.py b/src/pandas_profiling/compare_reports.py index 9433623a5..0aae0c628 100644 --- a/src/pandas_profiling/compare_reports.py +++ b/src/pandas_profiling/compare_reports.py @@ -221,17 +221,17 @@ def _apply_config(description: dict, config: Settings) -> dict: return description -def _is_alert_present(alert: Alert, alert_list: list) -> bool: - return any( - a.column_name == alert.column_name and a.alert_type == alert.alert_type - for a in alert_list - ) +def _is_alert_present(alert, alert_list): + for a in alert_list: + if a.column_name == alert.column_name and a.alert_type == alert.alert_type: + return True + return False def _create_placehoder_alerts(report_alerts: tuple) -> tuple: from copy import copy - fixed: list = [[] for _ in report_alerts] + fixed = [[] for _ in report_alerts] for idx, alerts in enumerate(report_alerts): for alert in alerts: fixed[idx].append(alert)