Skip to content

Commit

Permalink
chore: remove TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelThamm committed Dec 18, 2024
1 parent caf4c84 commit 15b88ab
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/cosl/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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 --- #
Expand Down

0 comments on commit 15b88ab

Please sign in to comment.