style: apply ruff auto-fixes

This commit is contained in:
2026-01-19 03:14:30 -08:00
parent 3ab122a55d
commit a961ac3ce7
72 changed files with 2477 additions and 2871 deletions

View File

@@ -9,11 +9,10 @@ This modal allows users to specify:
from textual.app import ComposeResult
from textual.screen import ModalScreen
from textual.containers import Container, Horizontal, Vertical, ScrollableContainer
from textual.containers import Container, Horizontal, Vertical
from textual.widgets import (
Static,
Button,
Label,
Select,
Checkbox,
TextArea,
@@ -448,8 +447,6 @@ class DownloadModal(ModalScreen):
try:
# Capture output from the cmdlet using temp files (more reliable than redirect)
import tempfile
import subprocess
# Try normal redirect first
import io
@@ -461,7 +458,7 @@ class DownloadModal(ModalScreen):
# Always capture output
try:
with redirect_stdout(stdout_buf), redirect_stderr(stderr_buf):
logger.info(f"Calling download_cmdlet...")
logger.info("Calling download_cmdlet...")
cmd_config = (
dict(self.config)
if isinstance(self.config,
@@ -637,7 +634,7 @@ class DownloadModal(ModalScreen):
# Also append detailed error info to worker stdout for visibility
if worker:
worker.append_stdout(f"\n❌ DOWNLOAD FAILED\n")
worker.append_stdout("\n❌ DOWNLOAD FAILED\n")
worker.append_stdout(f"Reason: {error_reason}\n")
if stderr_text and stderr_text.strip():
worker.append_stdout(
@@ -1169,7 +1166,7 @@ class DownloadModal(ModalScreen):
url.endswith(".pdf") or "pdf" in url.lower() for url in url
)
if all_pdfs:
logger.info(f"All url are PDFs - creating pseudo-playlist")
logger.info("All url are PDFs - creating pseudo-playlist")
self._handle_pdf_playlist(url)
return
@@ -1646,7 +1643,7 @@ class DownloadModal(ModalScreen):
break
if not json_line:
logger.error(f"No JSON found in get-tag output")
logger.error("No JSON found in get-tag output")
logger.debug(f"Raw output: {output}")
try:
self.app.call_from_thread(