aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/tasks/scanner.py
diff options
context:
space:
mode:
Diffstat (limited to 'webmentions_ssg/tasks/scanner.py')
-rw-r--r--webmentions_ssg/tasks/scanner.py16
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,