summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/work_pipeline.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-03 23:16:07 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-03 23:16:07 -0700
commit62fde540ef9c38d403ea89a6fb1db51bfba23da8 (patch)
tree2142c739349237b0ef137a57000850db1b2ff39d /fatcat_scholar/work_pipeline.py
parent74ef1c6f4e0f08dd6a6b3e6eacc4d780c990eb3f (diff)
downloadfatcat-scholar-62fde540ef9c38d403ea89a6fb1db51bfba23da8.tar.gz
fatcat-scholar-62fde540ef9c38d403ea89a6fb1db51bfba23da8.zip
flake8 fixes (partial)
Diffstat (limited to 'fatcat_scholar/work_pipeline.py')
-rw-r--r--fatcat_scholar/work_pipeline.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/fatcat_scholar/work_pipeline.py b/fatcat_scholar/work_pipeline.py
index af558a3..09ae02f 100644
--- a/fatcat_scholar/work_pipeline.py
+++ b/fatcat_scholar/work_pipeline.py
@@ -4,7 +4,6 @@ import sys
import minio
import requests
import argparse
-from pydantic import BaseModel, validator
from typing import List, Dict, Tuple, Optional, Any, Sequence
from fatcat_openapi_client import ReleaseEntity, FileEntity
import internetarchive
@@ -17,8 +16,6 @@ from fatcat_scholar.sandcrawler import (
)
from fatcat_scholar.issue_db import IssueDB, SimIssueRow, SimPubRow
from fatcat_scholar.schema import (
- es_biblio_from_release,
- es_release_from_release,
DocType,
IntermediateBundle,
)
@@ -171,7 +168,7 @@ class WorkPipeline:
release_ident: str,
) -> Optional[Any]:
"""
- issue_item
+ issue_item
pages: str
page_texts: list
page_num
@@ -214,7 +211,7 @@ class WorkPipeline:
# override 'close()' method so we can still read out contents
djvu_bytes = io.BytesIO()
djvu_bytes.close = lambda: None # type: ignore
- assert issue_item_djvu.download(fileobj=djvu_bytes) == True
+ assert issue_item_djvu.download(fileobj=djvu_bytes)
djvu_bytes.seek(0)
djvu_xml = io.StringIO(djvu_bytes.read().decode("UTF-8"))
del djvu_bytes