diff --git a/src/update_feed.py b/src/update_feed.py index 8a593ce..3783615 100644 --- a/src/update_feed.py +++ b/src/update_feed.py @@ -10,24 +10,23 @@ import logging import lzma import os -from queue import Queue import re import shutil import sys import tarfile -from textwrap import dedent -from urllib.error import HTTPError import urllib.request import zipfile -from collections import defaultdict from dataclasses import dataclass, field, fields from enum import Enum from itertools import groupby from pathlib import Path +from queue import Queue +from textwrap import dedent from typing import Callable, Generator, Iterator, Self +from urllib.error import HTTPError logging.basicConfig( - level=logging.INFO, + level=logging.DEBUG, stream=sys.stdout, format="[%(asctime)s][%(levelname)s]: %(message)s", datefmt="%Y-%m-%d %H:%M:%S %Z", @@ -540,7 +539,7 @@ def load_feed(feed_file: str) -> list[Entry]: try: with open(feed_file, "r") as f: reader = csv.reader(f) - headers = next(reader, None) # skip header + next(reader, None) # skip header for line in reader: if len(line) > 0: entries.append(Entry(*line)) @@ -1074,7 +1073,7 @@ def load_stashed_repos(src_path: Path, queue: Queue): try: with open(src_path, "r") as f: reader = csv.reader(f) - headers = next(reader, None) # skip header + next(reader, None) # skip header for line in reader: if len(line) > 0: queue.put(GithubRepo(*line))