diff options
| author | Dennis Fink | 2026-11-16 09:27:29 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-16 09:27:29 +0100 |
| commit | 85b10c38f39732421a230d938adddc7805d0e001 (patch) | |
| tree | 396f29962fac45245c6f1486e188ad905588659d /webmentions_ssg/tasks/scanner.py | |
| parent | eb404d9a1a328278c92753e65100579e7ad98e48 (diff) | |
| download | webmentions-ssg-85b10c38f39732421a230d938adddc7805d0e001.tar.gz webmentions-ssg-85b10c38f39732421a230d938adddc7805d0e001.zip | |
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.
Diffstat (limited to 'webmentions_ssg/tasks/scanner.py')
| -rw-r--r-- | webmentions_ssg/tasks/scanner.py | 16 |
1 files changed, 8 insertions, 8 deletions
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, |
