From 15b88ab9e3831ae58e227690a20af985ea84ad25 Mon Sep 17 00:00:00 2001 From: Michael Thamm Date: Wed, 18 Dec 2024 09:32:41 -0500 Subject: [PATCH] chore: remove TODOs --- src/cosl/rules.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/cosl/rules.py b/src/cosl/rules.py index 3e30d2a..cfabc04 100644 --- a/src/cosl/rules.py +++ b/src/cosl/rules.py @@ -301,7 +301,6 @@ def _from_str( raise ValueError("Empty") if self._is_official_rule_format(yaml_str): - # TODO DO not cast since pyright knows its a str, we still need to yaml_str = yaml_str groups = yaml_str["groups"] elif self._is_single_rule_format(yaml_str, self.rule_type): @@ -364,7 +363,6 @@ def _is_already_modified(self, name: str) -> bool: def _sanitize_metric_name(self, metric_name: str) -> str: """Sanitize a metric name according to https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels.""" - # TODO re.sub() instead of match. Check other examples in code base return "".join(char if re.match(r"[a-zA-Z0-9_:]", char) else "_" for char in metric_name) # ---- END STATIC HELPER METHODS --- #