Skip to content

Commit 7516d13

Browse files
jeremyederclaude
andcommitted
fix: Correct datetime import pattern in RepomixService
Changed from module-level import to direct datetime import for better readability and consistency with project conventions. Changes: - Import: `import datetime` → `from datetime import datetime` - Usage: `datetime.datetime.now()` → `datetime.now()` This follows Python best practices and improves code clarity by avoiding redundant module prefix. Priority: P1 - HIGH (code quality improvement) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 892bc43 commit 7516d13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/agentready/services/repomix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"""Repomix integration service for generating AI-friendly repository context."""
22

3-
import datetime
43
import json
54
import shutil
65
import subprocess
6+
from datetime import datetime
77
from pathlib import Path
88
from typing import Dict, List, Optional, Tuple
99

@@ -257,7 +257,7 @@ def check_freshness(self, max_age_days: int = 7) -> Tuple[bool, str]:
257257

258258
# Check most recent file
259259
newest_file = max(output_files, key=lambda p: p.stat().st_mtime)
260-
age_seconds = datetime.datetime.now().timestamp() - newest_file.stat().st_mtime
260+
age_seconds = datetime.now().timestamp() - newest_file.stat().st_mtime
261261
age_days = age_seconds / (24 * 3600)
262262

263263
if age_days > max_age_days:

0 commit comments

Comments
 (0)