@@ -2406,9 +2406,7 @@ def _detect_interaction_request(
24062406)
24072407
24082408_GOAL_SEEK_NUMBER_RE = re.compile(
2409- r"(?:^|[\s=:to])"
2410- r"(?:[$€£¥]?\s*)?"
2411- r"(\d[\d,]*(?:\.\d+)?)\s*([kmb])?\b",
2409+ r"(?:^|[\s=:to])" r"(?:[$€£¥]?\s*)?" r"(\d[\d,]*(?:\.\d+)?)\s*([kmb])?\b",
24122410 re.IGNORECASE,
24132411)
24142412
@@ -11968,9 +11966,7 @@ def _fmt_metric(metrics_json: str | None) -> str | None:
1196811966 _wu_trend = (
1196911967 "up"
1197011968 if (_wu_change_pct or 0) > 5
11971- else "down"
11972- if (_wu_change_pct or 0) < -5
11973- else "flat"
11969+ else "down" if (_wu_change_pct or 0) < -5 else "flat"
1197411970 )
1197511971
1197611972 # Per-day breakdown for the current week (7 entries)
@@ -11989,7 +11985,9 @@ def _fmt_metric(metrics_json: str | None) -> str | None:
1198911985 _wu_feature_tally: dict[str, dict[str, int]] = {}
1199011986 _wu_recent_logs = [
1199111987 lg for lg in _wu_logs if lg.created_at >= _wu_week_start
11992- ][:100] # cap to last 100 for performance
11988+ ][
11989+ :100
11990+ ] # cap to last 100 for performance
1199311991 for _wl in _wu_recent_logs:
1199411992 try:
1199511993 _feat_dict: dict = json.loads(_wl.input_features or "{}")
@@ -14627,9 +14625,7 @@ def _fmt_metric(metrics_json: str | None) -> str | None:
1462714625 else (
1462814626 "healthy"
1462914627 if _n_failed == 0
14630- else "warning"
14631- if _n_failed / _n_total < 0.1
14632- else "critical"
14628+ else "warning" if _n_failed / _n_total < 0.1 else "critical"
1463314629 )
1463414630 )
1463514631 _wh_total_events += _n_total
@@ -14688,9 +14684,7 @@ def _fmt_metric(metrics_json: str | None) -> str | None:
1468814684 else (
1468914685 "warning"
1469014686 if any(d["status"] == "warning" for d in _wh_dep_summaries)
14691- else "no_events"
14692- if _wh_total_events == 0
14693- else "healthy"
14687+ else "no_events" if _wh_total_events == 0 else "healthy"
1469414688 )
1469514689 )
1469614690 )
0 commit comments