Skip to content

Commit dc68c47

Browse files
Miyamura80claude
andcommitted
🐛 address PR review feedback: cross-platform path handling
- Use pathlib.Path instead of PurePosixPath in type annotation - Use rel.as_posix() for exclude matching to handle Windows paths Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3ba0dfe commit dc68c47

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/check_file_length.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def load_config() -> tuple[int, set[str]]:
3030

3131
def main() -> int:
3232
max_lines, exclude = load_config()
33-
violations: list[tuple[pathlib.PurePosixPath, int]] = []
33+
violations: list[tuple[pathlib.Path, int]] = []
3434

3535
for path in REPO_ROOT.rglob("*.py"):
3636
rel = path.relative_to(REPO_ROOT)
@@ -39,7 +39,7 @@ def main() -> int:
3939
continue
4040
if any(part in RECURSIVE_SKIP_DIRS for part in parts[:-1]):
4141
continue
42-
if str(rel) in exclude:
42+
if rel.as_posix() in exclude:
4343
continue
4444
line_count = len(path.read_text(encoding="utf-8", errors="ignore").splitlines())
4545
if line_count > max_lines:

0 commit comments

Comments
 (0)