mirror of
https://github.com/NohamR/OqeeAdWatch.git
synced 2026-01-11 00:38:16 +00:00
Lint + update
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user