diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-06-29 21:46:51 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-06-29 21:46:51 -0700 |
commit | 4891e854a6e27075233a530e4782b1750c4e35dc (patch) | |
tree | 0fb5a3aa1ef776c3a50e571fd10e709c20ef286c /fatcat_scholar/work_pipeline.py | |
parent | 35c1e59e1b4903ab7b4ac922199c0a55e3a20f5a (diff) | |
download | fatcat-scholar-4891e854a6e27075233a530e4782b1750c4e35dc.tar.gz fatcat-scholar-4891e854a6e27075233a530e4782b1750c4e35dc.zip |
fix lint errors (and some small bugs)
Diffstat (limited to 'fatcat_scholar/work_pipeline.py')
-rw-r--r-- | fatcat_scholar/work_pipeline.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fatcat_scholar/work_pipeline.py b/fatcat_scholar/work_pipeline.py index 303f9b1..accbc1d 100644 --- a/fatcat_scholar/work_pipeline.py +++ b/fatcat_scholar/work_pipeline.py @@ -1,12 +1,14 @@ import os import io import sys -import minio -import requests import argparse from typing import List, Dict, Tuple, Optional, Any, Sequence -from fatcat_openapi_client import ReleaseEntity, FileEntity + +import minio +import requests import internetarchive +from dynaconf import settings +from fatcat_openapi_client import ReleaseEntity, FileEntity from fatcat_scholar.api_entities import * from fatcat_scholar.djvu import djvu_extract_leaf_texts @@ -41,7 +43,7 @@ def parse_pages(raw: str) -> Tuple[Optional[int], Optional[int]]: return (first, last) -def test_parse_pages(): +def test_parse_pages() -> None: assert parse_pages("479-89") == (479, 489) assert parse_pages("466-7") == (466, 467) assert parse_pages("466-501") == (466, 501) @@ -331,7 +333,7 @@ class WorkPipeline: sim_fulltext=sim_fulltext, ) - def run_releases(self, release_stream: Sequence[str]): + def run_releases(self, release_stream: Sequence[str]) -> None: """ Iterates over the stream of releases, which are expected to be grouped (sorted) by work_ident. @@ -365,7 +367,7 @@ class WorkPipeline: print(ib.json()) -def main(): +def main() -> None: """ Run this command like: |