refactor: Fix circular exception import
This commit is contained in:
parent
6b35b2f918
commit
9e713193a8
4 changed files with 10 additions and 12 deletions
8
papis_extract/exceptions.py
Normal file
8
papis_extract/exceptions.py
Normal 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
|
|
@ -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__)
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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__)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue