diff --git a/src/auto_archiver/core/database.py b/src/auto_archiver/core/database.py index f7deaef..0eb5d81 100644 --- a/src/auto_archiver/core/database.py +++ b/src/auto_archiver/core/database.py @@ -1,12 +1,9 @@ from __future__ import annotations -from dataclasses import dataclass -from abc import abstractmethod, ABC +from abc import abstractmethod from typing import Union from auto_archiver.core import Metadata, BaseModule - -@dataclass class Database(BaseModule): def started(self, item: Metadata) -> None: diff --git a/src/auto_archiver/core/enricher.py b/src/auto_archiver/core/enricher.py index fe0d05f..0e50fa9 100644 --- a/src/auto_archiver/core/enricher.py +++ b/src/auto_archiver/core/enricher.py @@ -9,11 +9,9 @@ the archiving step and before storage or formatting. Enrichers are optional but highly useful for making the archived data more powerful. """ from __future__ import annotations -from dataclasses import dataclass -from abc import abstractmethod, ABC +from abc import abstractmethod from auto_archiver.core import Metadata, BaseModule -@dataclass class Enricher(BaseModule): """Base classes and utilities for enrichers in the Auto-Archiver system.""" diff --git a/src/auto_archiver/core/feeder.py b/src/auto_archiver/core/feeder.py index e539f5f..352cfd9 100644 --- a/src/auto_archiver/core/feeder.py +++ b/src/auto_archiver/core/feeder.py @@ -1,11 +1,8 @@ from __future__ import annotations -from dataclasses import dataclass from abc import abstractmethod from auto_archiver.core import Metadata from auto_archiver.core import BaseModule - -@dataclass class Feeder(BaseModule): @abstractmethod diff --git a/src/auto_archiver/core/formatter.py b/src/auto_archiver/core/formatter.py index beb0c0d..cf27cb3 100644 --- a/src/auto_archiver/core/formatter.py +++ b/src/auto_archiver/core/formatter.py @@ -1,10 +1,8 @@ from __future__ import annotations -from dataclasses import dataclass from abc import abstractmethod from auto_archiver.core import Metadata, Media, BaseModule -@dataclass class Formatter(BaseModule): @abstractmethod diff --git a/src/auto_archiver/core/storage.py b/src/auto_archiver/core/storage.py index 5274204..b40c5cc 100644 --- a/src/auto_archiver/core/storage.py +++ b/src/auto_archiver/core/storage.py @@ -1,18 +1,16 @@ from __future__ import annotations from abc import abstractmethod -from dataclasses import dataclass from typing import IO, Optional import os +from loguru import logger +from slugify import slugify + from auto_archiver.utils.misc import random_str from auto_archiver.core import Media, BaseModule, ArchivingContext, Metadata from auto_archiver.modules.hash_enricher.hash_enricher import HashEnricher -from loguru import logger -from slugify import slugify - -@dataclass class Storage(BaseModule): def store(self, media: Media, url: str, metadata: Optional[Metadata]=None) -> None: diff --git a/src/auto_archiver/modules/html_formatter/html_formatter.py b/src/auto_archiver/modules/html_formatter/html_formatter.py index 8f006e0..bfc2efa 100644 --- a/src/auto_archiver/modules/html_formatter/html_formatter.py +++ b/src/auto_archiver/modules/html_formatter/html_formatter.py @@ -1,5 +1,4 @@ from __future__ import annotations -from dataclasses import dataclass import mimetypes, os, pathlib from jinja2 import Environment, FileSystemLoader from urllib.parse import quote @@ -14,7 +13,6 @@ from auto_archiver.modules.hash_enricher import HashEnricher from auto_archiver.utils.misc import random_str from auto_archiver.core.module import get_module -@dataclass class HtmlFormatter(Formatter): environment: Environment = None template: any = None diff --git a/src/auto_archiver/modules/mute_formatter/mute_formatter.py b/src/auto_archiver/modules/mute_formatter/mute_formatter.py index 1c7cca2..129ddcb 100644 --- a/src/auto_archiver/modules/mute_formatter/mute_formatter.py +++ b/src/auto_archiver/modules/mute_formatter/mute_formatter.py @@ -1,11 +1,9 @@ from __future__ import annotations -from dataclasses import dataclass from auto_archiver.core import Metadata, Media from auto_archiver.core import Formatter -@dataclass class MuteFormatter(Formatter): def format(self, item: Metadata) -> Media: return None