From 1414066eed3f6ed4174a659566aea6ae5a985058 Mon Sep 17 00:00:00 2001 From: Uyanide Date: Tue, 7 Apr 2026 15:15:44 +0200 Subject: [PATCH] chore: de-markdown-lize comments --- src/lrx_cli/cache.py | 10 +++++----- src/lrx_cli/core.py | 2 +- src/lrx_cli/ranking.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lrx_cli/cache.py b/src/lrx_cli/cache.py index 2fe2029..d7accb7 100644 --- a/src/lrx_cli/cache.py +++ b/src/lrx_cli/cache.py @@ -29,7 +29,7 @@ _ALL_SLOTS = (SLOT_SYNCED, SLOT_UNSYNCED) # 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 = ( "(? IS NULL OR artist = ?) AND " "(? IS NULL OR title = ?) AND " @@ -249,7 +249,7 @@ class CacheEngine: # Read 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: key = _generate_key(track, source) except ValueError: @@ -430,7 +430,7 @@ class CacheEngine: def find_best_positive( self, track: TrackMeta, status: CacheStatus ) -> 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. Returns the highest-confidence entry, or None. @@ -488,7 +488,7 @@ class CacheEngine: making hard artist filtering unreliable for cross-language queries. 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. """ if not title: @@ -551,7 +551,7 @@ class CacheEngine: confidence: float, source: str, ) -> 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. """ diff --git a/src/lrx_cli/core.py b/src/lrx_cli/core.py index 71b7e2d..d005bc9 100644 --- a/src/lrx_cli/core.py +++ b/src/lrx_cli/core.py @@ -275,7 +275,7 @@ class LrcManager: bypass_cache: bool = False, allow_unsynced: bool = False, ) -> 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( self._fetch_for_track( track, diff --git a/src/lrx_cli/ranking.py b/src/lrx_cli/ranking.py index 74e5193..00ef040 100644 --- a/src/lrx_cli/ranking.py +++ b/src/lrx_cli/ranking.py @@ -21,7 +21,7 @@ def is_better_result( *, allow_unsynced: bool, ) -> bool: - """Return True when *new* should rank above *old*. + """Return True when new should rank above old. Ordering rules (highest first): 1) Positive statuses always beat negative statuses.