From fc93ebaba0484618fc27ccefaf787d62b66a3f49 Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Fri, 28 Jul 2023 10:49:39 +0100 Subject: [PATCH] cleanup --- src/auto_archiver/core/orchestrator.py | 1 - src/auto_archiver/core/step.py | 3 +-- src/auto_archiver/utils/misc.py | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/auto_archiver/core/orchestrator.py b/src/auto_archiver/core/orchestrator.py index 1946268..35ff73b 100644 --- a/src/auto_archiver/core/orchestrator.py +++ b/src/auto_archiver/core/orchestrator.py @@ -105,7 +105,6 @@ class ArchivingOrchestrator: # looks for Media in result.media and also result.media[x].properties (as list or dict values) result.store() - #TODO: remove any duplicate media, if hash is available # 6 - format and store formatted if needed # enrichers typically need access to already stored URLs etc diff --git a/src/auto_archiver/core/step.py b/src/auto_archiver/core/step.py index 973bc1c..3917a89 100644 --- a/src/auto_archiver/core/step.py +++ b/src/auto_archiver/core/step.py @@ -1,9 +1,8 @@ from __future__ import annotations -from dataclasses import dataclass, field +from dataclasses import dataclass from inspect import ClassFoundException from typing import Type from abc import ABC -# from collections.abc import Iterable @dataclass diff --git a/src/auto_archiver/utils/misc.py b/src/auto_archiver/utils/misc.py index 7bf578d..22d5502 100644 --- a/src/auto_archiver/utils/misc.py +++ b/src/auto_archiver/utils/misc.py @@ -20,6 +20,7 @@ def expand_url(url): logger.error(f'Failed to expand url {url}') return url + def getattr_or(o: object, prop: str, default=None): try: res = getattr(o, prop)