From d54ee045477a5fb8722c7ec6d128b0ff88d900d1 Mon Sep 17 00:00:00 2001 From: Simon Brugman Date: Tue, 14 Jun 2022 10:52:34 +0200 Subject: [PATCH] refactor: shorten lambda functions --- popmon/alerting/compute_tl_bounds.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/popmon/alerting/compute_tl_bounds.py b/popmon/alerting/compute_tl_bounds.py index 1929537d..961e1601 100644 --- a/popmon/alerting/compute_tl_bounds.py +++ b/popmon/alerting/compute_tl_bounds.py @@ -231,7 +231,7 @@ def transform(self, test_data: dict) -> Tuple[Any, Any]: feature, test_df.columns, pattern, - rule=lambda _, feature, pattern: f"{feature}:{pattern}", + rule=lambda _, feat, pat: f"{feat}:{pat}", ) # --- 2. tl bounds not explicitly defined for a particular feature, # see if a wildcard match can be found. @@ -240,7 +240,7 @@ def transform(self, test_data: dict) -> Tuple[Any, Any]: feature, test_df.columns, pattern, - rule=lambda _, __, pattern: pattern, + rule=lambda _, __, pat: pat, ) return self.traffic_lights, self.traffic_light_funcs