From 85b10c38f39732421a230d938adddc7805d0e001 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Mon, 16 Nov 2026 09:27:29 +0100 Subject: style(core): reorder module declarations Group globals and data classes near module imports, keep primary classes and functions together, and move implementation helpers after their public callers. Reorder Alembic setup so configuration happens after the required helpers are defined, without changing runtime behavior. --- webmentions_ssg/tasks/scanner.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'webmentions_ssg/tasks/scanner.py') diff --git a/webmentions_ssg/tasks/scanner.py b/webmentions_ssg/tasks/scanner.py index fb0c770..6869477 100644 --- a/webmentions_ssg/tasks/scanner.py +++ b/webmentions_ssg/tasks/scanner.py @@ -20,6 +20,14 @@ from .sender import send_webmention from .source_parser import ScannedSource, SourceScanError, scan_source_file +@dataclass(frozen=True) +class TreeScanResult: + """Count and discovered paths from a traversal of the source tree.""" + + scanned_count: int + seen_paths: frozenset[str] + + def build_source(scanned: ScannedSource, scan_time: datetime) -> SourceDocument: """Build a source model from a newly discovered document. @@ -118,14 +126,6 @@ def scan_sources() -> None: _scan_and_enqueue() -@dataclass(frozen=True) -class TreeScanResult: - """Count and discovered paths from a traversal of the source tree.""" - - scanned_count: int - seen_paths: frozenset[str] - - def reconcile_source_tree( root: Path, base_url: str | None, -- cgit v1.3.1