Lint + update

This commit is contained in:
√(noham)²
2025-12-23 10:46:32 +01:00
parent 9f71bc6073
commit 2534210c91
7 changed files with 151 additions and 91 deletions

View File

@@ -1,15 +1,18 @@
"""Data loading utilities for the ad visualizer."""
import sqlite3
from typing import Sequence, List, Optional
from pathlib import Path
import sys
from utils.scrap import DB_PATH, get_connection
# Allow running as a script from anywhere
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent))
from utils.scrap import DB_PATH, get_connection
Row = Sequence
def load_ads_data(
channel_id: str, start_date: Optional[str] = None, end_date: Optional[str] = None
) -> List[Row]:
@@ -50,4 +53,4 @@ def list_channels() -> List[str]:
)
return [row[0] for row in cursor.fetchall()]
finally:
conn.close()
conn.close()