Skip to content

Commit

Permalink
refactor: shorten lambda functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed Jun 14, 2022
1 parent 5539848 commit d54ee04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions popmon/alerting/compute_tl_bounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit d54ee04

Please sign in to comment.