Skip to content

Commit 0cc35e7

Browse files
gzenzclaude
andcommitted
fix: lint errors (line length, trailing whitespace, variable naming)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 266fc49 commit 0cc35e7

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

code_review_graph/communities.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,9 @@ def store_communities(
624624
count = 0
625625
for comm in communities:
626626
cursor = conn.execute(
627-
"""INSERT INTO communities (name, level, cohesion, size, dominant_language, description)
628-
VALUES (?, ?, ?, ?, ?, ?)""",
627+
"INSERT INTO communities"
628+
" (name, level, cohesion, size, dominant_language, description)"
629+
" VALUES (?, ?, ?, ?, ?, ?)",
629630
(
630631
comm["name"],
631632
comm.get("level", 0),

code_review_graph/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3341,7 +3341,7 @@ def _get_name(self, node, language: str, kind: str) -> Optional[str]:
33413341
if language == "go" and node.type == "method_declaration":
33423342
for child in node.children:
33433343
if child.type == "field_identifier":
3344-
return child.text.decode("utf-8", errors="replace")
3344+
return child.text.decode("utf-8", errors="replace")
33453345
# Most languages use a 'name' child
33463346
for child in node.children:
33473347
if child.type in (

code_review_graph/skills.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,14 +478,14 @@ def install_git_hook(repo_root: Path) -> Path | None:
478478
existing one — preserving any hooks already there. Returns None when no
479479
``.git`` directory is found.
480480
"""
481-
_SCRIPT = """\
481+
script = """\
482482
#!/bin/sh
483483
# Installed by code-review-graph. Remove this file to disable pre-commit graph checks.
484484
if command -v code-review-graph >/dev/null 2>&1; then
485485
code-review-graph detect-changes --brief || true
486486
fi
487487
"""
488-
_MARKER = "code-review-graph detect-changes"
488+
marker = "code-review-graph detect-changes"
489489

490490
git_dir = repo_root / ".git"
491491
if not git_dir.is_dir():
@@ -497,11 +497,11 @@ def install_git_hook(repo_root: Path) -> Path | None:
497497

498498
if hook_path.exists():
499499
existing = hook_path.read_text(encoding="utf-8")
500-
if _MARKER in existing:
500+
if marker in existing:
501501
return hook_path
502-
hook_path.write_text(existing.rstrip("\n") + "\n" + _SCRIPT, encoding="utf-8")
502+
hook_path.write_text(existing.rstrip("\n") + "\n" + script, encoding="utf-8")
503503
else:
504-
hook_path.write_text(_SCRIPT, encoding="utf-8")
504+
hook_path.write_text(script, encoding="utf-8")
505505

506506
hook_path.chmod(0o755)
507507
logger.info("Wrote git pre-commit hook: %s", hook_path)

0 commit comments

Comments
 (0)