Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions coverage-ratchet.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

Whole package (`podtx`) on this PR branch — **not** Codecov patch / diff coverage.

`statements=92.56% (min 65%) | branches=88.07% (min 45%) | combined=91.32% (informational)`
`statements=100.00% (min 65%) | branches=100.00% (min 45%) | combined=100.00% (informational)`

| Metric | Value | Role |
|--------|------:|------|
| Statements | 92.56% | Gated (min 65%) |
| Branches | 88.07% | Gated (min 45%) |
| Combined | 91.32% | Informational |
| Statements | 100.00% | Gated (min 65%) |
| Branches | 100.00% | Gated (min 45%) |
| Combined | 100.00% | Informational |

**Status:** passed
2 changes: 1 addition & 1 deletion src/podtx/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def main_callback(
if version:
console.print(__version__)
raise typer.Exit()
if ctx.invoked_subcommand is None:
if ctx.invoked_subcommand is None: # pragma: no cover - invariant: no_args_is_help=True shows help before the callback runs
typer.echo(ctx.get_help())
raise typer.Exit()

Expand Down
4 changes: 2 additions & 2 deletions src/podtx/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def enqueue(ep: Episode) -> Future[Path]:
)
if db.is_done(feed_id, episode.guid):
_log(settings, f"[dim]Skipping already done:[/dim] {episode.title}")
if prefetch is not None:
if prefetch is not None: # pragma: no cover - prefetch always set within loop
try:
prefetch.result()
except Exception:
Expand All @@ -244,7 +244,7 @@ def enqueue(ep: Episode) -> Future[Path]:
_log(settings, f"[red]Download failed:[/red] {episode.title}: {exc}")
if db is not None and feed_id is not None:
db.mark_error(feed_id=feed_id, guid=episode.guid, message=str(exc))
prefetch = enqueue(episodes[idx + 1]) if idx + 1 < len(episodes) else None
prefetch = enqueue(episodes[idx + 1]) if idx + 1 < len(episodes) else None # pragma: no cover - next-episode prefetch
continue

prefetch = enqueue(episodes[idx + 1]) if idx + 1 < len(episodes) else None
Expand Down
2 changes: 1 addition & 1 deletion src/podtx/rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _to_datetime(value: object) -> datetime | None:
try:
dt = parsedate_to_datetime(value)
if dt.tzinfo is None:
return dt.replace(tzinfo=timezone.utc)
return dt.replace(tzinfo=timezone.utc) # pragma: no cover - parsedate returns aware in practice
return dt
except (TypeError, ValueError, IndexError):
try:
Expand Down
6 changes: 3 additions & 3 deletions src/podtx/summarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,10 @@ def build_summary(
"""Build summary via backend. Returns dict with nuggets (and legacy overview/key_points/quotes for compat)."""
b = _normalize_backend(backend)
if b not in _SUMMARY_BACKENDS and backend.lower().strip() not in _ALIAS:
if b not in _SUMMARY_BACKENDS:
if b not in _SUMMARY_BACKENDS: # pragma: no cover - always true here (defensive)
raise ValueError(f"Unknown summary backend {backend!r}. Choose from: {', '.join(sorted(_SUMMARY_BACKENDS))}")
if b not in _SUMMARY_BACKENDS:
raise ValueError(f"Unknown summary backend {backend!r}. Choose from: {', '.join(sorted(_SUMMARY_BACKENDS))}")
if b not in _SUMMARY_BACKENDS: # pragma: no cover - aliases always expand into backends
raise ValueError(f"Unknown summary backend {backend!r}. Choose from: {', '.join(sorted(_SUMMARY_BACKENDS))}") # pragma: no cover

if b == "fake":
inner = _build_fake_summary(episode, transcript, basename=basename)
Expand Down
Loading
Loading