mirror of
https://github.com/wiltodelta/remove-ai-watermarks.git
synced 2026-10-22 08:38:22 +02:00
Refresh the C2PA soft-binding snapshot and fix Ruff ICN001
The upstream registry gained be.immostory.videoseal.1 at revision d5960248, so `sync_c2pa_soft_bindings.py --check` failed lint on main and on every pull request. That step runs ahead of Ruff, which hid an ICN001 error in scripts/_corpus_scan.py; import `date` directly, as the sibling scripts do. Document the check's live-upstream behavior next to the refresh command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3e20bb0b92
commit
cf695de57f
3 files changed
+21
-6
No files matched your search
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from datetime import date
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -10,15 +10,15 @@ if TYPE_CHECKING:
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def corpus_day(path: Path, corpus: Path) -> datetime.date | None:
|
||||
def corpus_day(path: Path, corpus: Path) -> date | None:
|
||||
"""Read the leading YYYY-MM-DD corpus segment, if present."""
|
||||
try:
|
||||
return datetime.date.fromisoformat(path.relative_to(corpus).parts[0])
|
||||
return date.fromisoformat(path.relative_to(corpus).parts[0])
|
||||
except (ValueError, IndexError):
|
||||
return None
|
||||
|
||||
|
||||
def corpus_files(corpus: Path, since: datetime.date | None, *, suffixes: Collection[str] | None = None) -> list[Path]:
|
||||
def corpus_files(corpus: Path, since: date | None, *, suffixes: Collection[str] | None = None) -> list[Path]:
|
||||
"""Return a deterministic recursive walk, optionally date- and suffix-bounded."""
|
||||
if since is None:
|
||||
candidates = corpus.rglob("*")
|
||||
|
||||
Reference in new issue
Block a user