Skip to content

Commit e414c52

Browse files
fix: resolve all ruff lint errors across tests and reports
Remove unused imports in test files and add explicit re-export aliases in reports __init__.py files to satisfy ruff F401 checks. Made-with: Cursor
1 parent 58e3779 commit e414c52

13 files changed

Lines changed: 28 additions & 31 deletions

File tree

cli/migrate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def _load_csv_rows(path: Path) -> List[Dict[str, str]]:
2626
return rows
2727
with path.open("r", encoding="utf-8") as f:
2828
reader = csv.DictReader(f)
29-
fieldnames = reader.fieldnames or []
3029
for row in reader:
3130
normalized: Dict[str, str] = {}
3231
pr_url = (

reports/advanced/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Advanced reports (15, 16, 21)."""
22

33
from .reports import (
4-
report_complexity_trend_by_team,
5-
report_cumulative_complexity,
6-
report_developer_line_velocity,
4+
report_complexity_trend_by_team as report_complexity_trend_by_team,
5+
report_cumulative_complexity as report_cumulative_complexity,
6+
report_developer_line_velocity as report_developer_line_velocity,
77
)

reports/basic/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""Basic operational reports (1-3, 7, 18, 19)."""
22

33
from .reports import (
4-
report_avg_complexity_rolling,
5-
report_avg_merge_cycle_time,
6-
report_complexity_volume_by_month,
7-
report_complexity_volume_over_time,
8-
report_high_complexity_frequency,
9-
report_pr_count_vs_complexity,
4+
report_avg_complexity_rolling as report_avg_complexity_rolling,
5+
report_avg_merge_cycle_time as report_avg_merge_cycle_time,
6+
report_complexity_volume_by_month as report_complexity_volume_by_month,
7+
report_complexity_volume_over_time as report_complexity_volume_over_time,
8+
report_high_complexity_frequency as report_high_complexity_frequency,
9+
report_pr_count_vs_complexity as report_pr_count_vs_complexity,
1010
)

reports/chart_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Export all report data as JSON for dynamic ECharts rendering. Reuses report logic."""
22

3-
from typing import Any, Dict, List, Optional
3+
from typing import Any, Dict, List
44

55
import numpy as np
66
import pandas as pd

reports/fairness/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
"""Fairness / anti-gaming reports (10-11)."""
22

3-
from .reports import report_pr_count_vs_avg_complexity, report_pr_size_vs_complexity
3+
from .reports import (
4+
report_pr_count_vs_avg_complexity as report_pr_count_vs_avg_complexity,
5+
report_pr_size_vs_complexity as report_pr_size_vs_complexity,
6+
)

reports/interactive_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import json
44
from pathlib import Path
5-
from typing import Any, Dict, List, Optional
5+
from typing import List, Optional
66

77
import pandas as pd
88

reports/risk/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
"""Risk & quality reports (8-9)."""
22

3-
from .reports import report_complexity_histogram, report_complexity_vs_merge_weekday
3+
from .reports import (
4+
report_complexity_histogram as report_complexity_histogram,
5+
report_complexity_vs_merge_weekday as report_complexity_vs_merge_weekday,
6+
)

reports/team/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Team-level leadership reports (4-6, 12, 14, 17)."""
22

33
from .reports import (
4-
report_avg_merge_cycle_time_by_team,
5-
report_complexity_distribution_by_team,
6-
report_complexity_per_dev_vs_pr_count,
7-
report_complexity_per_team_per_dev,
8-
report_complexity_vs_cycle_time,
9-
report_developer_contribution,
10-
report_team_gini,
4+
report_avg_merge_cycle_time_by_team as report_avg_merge_cycle_time_by_team,
5+
report_complexity_distribution_by_team as report_complexity_distribution_by_team,
6+
report_complexity_per_dev_vs_pr_count as report_complexity_per_dev_vs_pr_count,
7+
report_complexity_per_team_per_dev as report_complexity_per_team_per_dev,
8+
report_complexity_vs_cycle_time as report_complexity_vs_cycle_time,
9+
report_developer_contribution as report_developer_contribution,
10+
report_team_gini as report_team_gini,
1111
)

tests/test_csv_handler.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
"""Tests for CSV handler module."""
22

33
import csv
4-
import pytest
5-
from pathlib import Path
64

75
from cli.csv_handler import (
86
CSV_FIELDNAMES,

tests/test_llm_anthropic.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
"""Tests for Anthropic LLM provider."""
22

3-
import pytest
43
from unittest.mock import patch, MagicMock
54

65
from cli.llm_anthropic import AnthropicProvider
7-
from cli.llm_base import LLMProvider, LLMError
6+
from cli.llm_base import LLMProvider
87

98

109
class TestAnthropicProviderBase:

0 commit comments

Comments
 (0)