Skip to content

Commit 0fe6430

Browse files
jeremyederclaude
andcommitted
chore: apply black/isort formatting from rebase
Fix formatting issues that emerged after rebasing on main. Auto-formatters (black, isort, ruff --fix) applied to ensure CI passes. Changes: - Black reformatted 12 files - isort organized imports - ruff removed unused imports (align.py) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e6b7908 commit 0fe6430

22 files changed

+57
-54
lines changed

batch-repos.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
https://github.com/ambient-code/agentready
2+
https://github.com/ambient-code/platform
3+
https://github.com/ambient-code/spec-kit-rh

src/agentready/cli/align.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
import click
77

88
from ..models.config import Config
9-
from ..models.repository import Repository
109
from ..services.fixer_service import FixerService
11-
from ..services.language_detector import LanguageDetector
1210
from ..services.scanner import Scanner
1311

1412

src/agentready/models/batch_assessment.py

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

33
from dataclasses import dataclass, field
44
from datetime import datetime
5-
from pathlib import Path
65

76
from .assessment import Assessment
87

src/agentready/reporters/csv_reporter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ def generate(
112112
# SECURITY: Sanitize all string fields
113113
row = {
114114
"repo_url": self.sanitize_csv_field(result.repository_url),
115-
"repo_name": self.sanitize_csv_field(assessment.repository.name),
115+
"repo_name": self.sanitize_csv_field(
116+
assessment.repository.name
117+
),
116118
"overall_score": assessment.overall_score,
117119
"certification_level": self.sanitize_csv_field(
118120
assessment.certification_level

src/agentready/services/assessment_cache.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pathlib import Path
77
from typing import Optional
88

9-
from ..models import Assessment, BatchAssessment, RepositoryResult
9+
from ..models import Assessment
1010

1111

1212
class AssessmentCache:
@@ -230,7 +230,9 @@ def get_stats(self) -> dict:
230230
)
231231
valid = cursor.fetchone()[0]
232232

233-
cursor = conn.execute("SELECT COUNT(DISTINCT repository_url) FROM assessments")
233+
cursor = conn.execute(
234+
"SELECT COUNT(DISTINCT repository_url) FROM assessments"
235+
)
234236
unique_repos = cursor.fetchone()[0]
235237

236238
return {
@@ -258,7 +260,6 @@ def _deserialize_assessment(data: dict) -> Assessment:
258260
# In practice, you'd need full deserialization logic
259261
# For now, we'll use a placeholder that assumes the cached JSON
260262
# has the correct structure
261-
from .scanner import Scanner
262263

263264
# Note: This is a simplified approach. In production, you'd need
264265
# proper deserialization that reconstructs all nested objects

src/agentready/services/batch_scanner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from typing import Callable, Optional
77
from uuid import uuid4
88

9-
from ..models import Assessment, BatchAssessment, BatchSummary, RepositoryResult
9+
from ..models import BatchAssessment, BatchSummary, RepositoryResult
1010
from .assessment_cache import AssessmentCache
1111
from .repository_manager import RepositoryManager
1212
from .scanner import Scanner

src/agentready/services/github_scanner.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ def get_org_repos(
146146
response.raise_for_status()
147147

148148
except requests.Timeout:
149-
raise GitHubAPIError(
150-
f"GitHub API timeout for organization: {org_name}"
151-
)
149+
raise GitHubAPIError(f"GitHub API timeout for organization: {org_name}")
152150

153151
except requests.HTTPError as e:
154152
# SECURITY: Redact token before raising

tests/integration/test_github_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""Integration tests for GitHub scanner (requires GITHUB_TOKEN)."""
22

33
import os
4+
import urllib.parse
45

56
import pytest
6-
import urllib.parse
77

88
from agentready.services.github_scanner import GitHubOrgScanner
99

tests/security/test_xss_prevention.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ def create_test_batch_with_payload(payload: str, inject_location: str):
5757
)
5858

5959
repo_url = (
60-
"https://github.com/test/repo"
61-
if inject_location != "repo_url"
62-
else payload
60+
"https://github.com/test/repo" if inject_location != "repo_url" else payload
6361
)
6462
error = payload if inject_location == "error_message" else None
6563

tests/unit/cli/test_main.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
"""Unit tests for main CLI commands."""
22

3-
import json
4-
import shutil
5-
import tempfile
63
from pathlib import Path
74
from unittest.mock import MagicMock, patch
85

@@ -18,7 +15,6 @@
1815
load_config,
1916
research_version,
2017
run_assessment,
21-
show_version,
2218
)
2319
from agentready.models.config import Config
2420

0 commit comments

Comments
 (0)