From 6f2483bb601320080385745ea7befe2a8f7dc227 Mon Sep 17 00:00:00 2001 From: Mizaki Date: Sat, 22 Jun 2024 22:17:55 +0100 Subject: [PATCH] TagOrigin to MetadataOrigin --- mangaupdates_talker/mangaupdates.py | 7 +++---- requirements-dev.txt | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mangaupdates_talker/mangaupdates.py b/mangaupdates_talker/mangaupdates.py index b339eab..d1e8f8a 100644 --- a/mangaupdates_talker/mangaupdates.py +++ b/mangaupdates_talker/mangaupdates.py @@ -22,19 +22,18 @@ import pathlib import re import time -from typing import Any, Callable, cast +from typing import Any, Callable, TypedDict, cast from urllib.parse import urljoin import requests import settngs from comicapi import utils -from comicapi.genericmetadata import ComicSeries, GenericMetadata, TagOrigin +from comicapi.genericmetadata import ComicSeries, GenericMetadata, MetadataOrigin from comictalker import talker_utils from comictalker.comiccacher import ComicCacher from comictalker.comiccacher import Series as CCSeries from comictalker.comictalker import ComicTalker, TalkerDataError, TalkerNetworkError from pyrate_limiter import Duration, Limiter, RequestRate -from typing_extensions import TypedDict logger = logging.getLogger(f"comictalker.{__name__}") @@ -601,7 +600,7 @@ def fetch_issues_by_series_issue_num_and_year( def _map_comic_issue_to_metadata(self, series: MUSeries) -> GenericMetadata: md = GenericMetadata( - tag_origin=TagOrigin(self.id, self.name), + data_origin=MetadataOrigin(self.id, self.name), series_id=utils.xlate(series["series_id"]), issue_id=utils.xlate(series["series_id"]), ) diff --git a/requirements-dev.txt b/requirements-dev.txt index d4a5c16..178c880 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,5 @@ black>=22 +build flake8==4.* flake8-black flake8-encodings @@ -8,4 +9,5 @@ isort>=5.10 pytest==7.* setuptools>=42 setuptools_scm[toml]>=3.4 +tox wheel