chore: de-markdown-lize comments

This commit is contained in:
2026-04-07 15:15:44 +02:00
parent 5666dd13c0
commit 1414066eed
3 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -29,7 +29,7 @@ _ALL_SLOTS = (SLOT_SYNCED, SLOT_UNSYNCED)
# Fixed WHERE clause for exact track matching. Column names are hardcoded # Fixed WHERE clause for exact track matching. Column names are hardcoded
# literals; only the *values* come from user-supplied params — no injection risk. # literals; only the values come from user-supplied params — no injection risk.
_TRACK_WHERE = ( _TRACK_WHERE = (
"(? IS NULL OR artist = ?) AND " "(? IS NULL OR artist = ?) AND "
"(? IS NULL OR title = ?) AND " "(? IS NULL OR title = ?) AND "
@@ -249,7 +249,7 @@ class CacheEngine:
# Read # Read
def get_all(self, track: TrackMeta, source: str) -> list[LyricResult]: def get_all(self, track: TrackMeta, source: str) -> list[LyricResult]:
"""Return all non-expired cached slot rows for *track*/*source*.""" """Return all non-expired cached slot rows for track/source."""
try: try:
key = _generate_key(track, source) key = _generate_key(track, source)
except ValueError: except ValueError:
@@ -430,7 +430,7 @@ class CacheEngine:
def find_best_positive( def find_best_positive(
self, track: TrackMeta, status: CacheStatus self, track: TrackMeta, status: CacheStatus
) -> Optional[LyricResult]: ) -> Optional[LyricResult]:
"""Find the best positive (synced/unsynced) cache entry for *track*. """Find the best positive (synced/unsynced) cache entry for track.
Uses exact metadata match (artist + title + album) across all sources. Uses exact metadata match (artist + title + album) across all sources.
Returns the highest-confidence entry, or None. Returns the highest-confidence entry, or None.
@@ -488,7 +488,7 @@ class CacheEngine:
making hard artist filtering unreliable for cross-language queries. making hard artist filtering unreliable for cross-language queries.
Ignores artist, album and source. Only returns positive results Ignores artist, album and source. Only returns positive results
(synced/unsynced) that have not expired. When *length* is provided, (synced/unsynced) that have not expired. When length is provided,
filters by duration tolerance and sorts by closest match. filters by duration tolerance and sorts by closest match.
""" """
if not title: if not title:
@@ -551,7 +551,7 @@ class CacheEngine:
confidence: float, confidence: float,
source: str, source: str,
) -> int: ) -> int:
"""Update confidence for a specific source's cache entry matching *track*. """Update confidence for a specific source's cache entry matching track.
Returns the number of rows updated. Returns the number of rows updated.
""" """
+1 -1
View File
@@ -275,7 +275,7 @@ class LrcManager:
bypass_cache: bool = False, bypass_cache: bool = False,
allow_unsynced: bool = False, allow_unsynced: bool = False,
) -> Optional[LyricResult]: ) -> Optional[LyricResult]:
"""Fetch lyrics for *track* using the group-based parallel pipeline.""" """Fetch lyrics for track using the group-based parallel pipeline."""
return asyncio.run( return asyncio.run(
self._fetch_for_track( self._fetch_for_track(
track, track,
+1 -1
View File
@@ -21,7 +21,7 @@ def is_better_result(
*, *,
allow_unsynced: bool, allow_unsynced: bool,
) -> bool: ) -> bool:
"""Return True when *new* should rank above *old*. """Return True when new should rank above old.
Ordering rules (highest first): Ordering rules (highest first):
1) Positive statuses always beat negative statuses. 1) Positive statuses always beat negative statuses.