refactor: Fix circular exception import

This commit is contained in:
Marty Oehme 2024-06-14 15:18:02 +02:00
parent 6b35b2f918
commit 9e713193a8
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
4 changed files with 10 additions and 12 deletions

View file

@ -0,0 +1,8 @@
class ExtractionError(Exception):
"""Raised for exceptions during extraction.
Something went wrong during the extraction process in the extractor
run routine itself.
"""
pass

View file

@ -8,7 +8,7 @@ import papis.logging
from papis.document import Document from papis.document import Document
from papis_extract.annotation import Annotation from papis_extract.annotation import Annotation
from papis_extract.extractors import ExtractionError from papis_extract.exceptions import ExtractionError
logger = papis.logging.get_logger(__name__) logger = papis.logging.get_logger(__name__)

View file

@ -16,13 +16,3 @@ if find_spec("bs4") and find_spec("magic"):
all_extractors["pocketbook"] = PocketBookExtractor() all_extractors["pocketbook"] = PocketBookExtractor()
else: else:
logger.debug("pocketbook extractor not activated.") logger.debug("pocketbook extractor not activated.")
class ExtractionError(Exception):
"""Raised for exceptions during extraction.
Something went wrong during the extraction process in the extractor
run routine itself.
"""
pass

View file

@ -9,7 +9,7 @@ import papis.logging
import pymupdf as mu import pymupdf as mu
from papis_extract.annotation import Annotation from papis_extract.annotation import Annotation
from papis_extract.extractors import ExtractionError from papis_extract.exceptions import ExtractionError
logger = papis.logging.get_logger(__name__) logger = papis.logging.get_logger(__name__)