Skip to content

Commit 9912656

Browse files
committed
style: fix lint issues in CLI metric normalization
1 parent f19d986 commit 9912656

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

reviewtally/cli/parse_cmd_line.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,11 @@ class CommandLineArgs(TypedDict):
6161

6262
def _normalize_metric_identifier(value: str) -> str:
6363
"""Convert CLI-provided metric identifiers to internal snake_case."""
64-
6564
return value.replace("-", "_")
6665

6766

6867
def _format_cli_metric_identifier(value: str) -> str:
6968
"""Expose internal metric identifiers as CLI-friendly names."""
70-
7169
return value.replace("_", "-")
7270

7371

@@ -408,7 +406,7 @@ def parse_cmd_line() -> CommandLineArgs: # noqa: C901, PLR0912, PLR0915
408406
)
409407
if individual_chart_metric_input is not None:
410408
individual_chart_metric_input = _normalize_metric_identifier(
411-
individual_chart_metric_input
409+
individual_chart_metric_input,
412410
)
413411
individual_metric_specified = individual_chart_metric_input is not None
414412
if (

tests/cli/test_parse_cmd_line.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ def test_hyphenated_metric_arguments_normalized(
422422
mock_exit: Any,
423423
) -> None:
424424
"""Hyphenated metric values from CLI are normalized to snake_case."""
425-
426425
mock_argv.__getitem__.side_effect = lambda x: [
427426
"review-tally",
428427
"--org",

0 commit comments

Comments
 (0)