diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-06-22 13:55:35 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-06-22 13:55:35 -0700 |
commit | b1b518e2acd819034e27d3a4b47918a91c1199b8 (patch) | |
tree | 57fc7a2f16c1dd947c61e8e02774b1b272b59aab | |
parent | 0b731c90c6b860d06c81c0082518e5b03bd82f04 (diff) | |
download | chocula-b1b518e2acd819034e27d3a4b47918a91c1199b8.tar.gz chocula-b1b518e2acd819034e27d3a4b47918a91c1199b8.zip |
flake8 cleanups
-rwxr-xr-x | check_issn_urls.py | 1 | ||||
-rw-r--r-- | chocula/__init__.py | 8 | ||||
-rw-r--r-- | chocula/__main__.py | 2 | ||||
-rw-r--r-- | chocula/common.py | 2 | ||||
-rw-r--r-- | chocula/database.py | 4 | ||||
-rw-r--r-- | chocula/directories/sim.py | 5 | ||||
-rw-r--r-- | chocula/kbart.py | 1 | ||||
-rw-r--r-- | chocula/util.py | 4 |
8 files changed, 9 insertions, 18 deletions
diff --git a/check_issn_urls.py b/check_issn_urls.py index 23169f1..956c359 100755 --- a/check_issn_urls.py +++ b/check_issn_urls.py @@ -30,7 +30,6 @@ For each URL, do a request and record, as JSON: HTTP status will be -1 if domain does not even resolve. """ -import os import sys import json import time diff --git a/chocula/__init__.py b/chocula/__init__.py index 2191320..3fd0e3f 100644 --- a/chocula/__init__.py +++ b/chocula/__init__.py @@ -1,4 +1,4 @@ -from chocula.config import ChoculaConfig -from chocula.database import ChoculaDatabase, IssnDatabase -from chocula.directories import * -from chocula.kbart import * +from chocula.config import ChoculaConfig # noqa: F401 +from chocula.database import ChoculaDatabase, IssnDatabase # noqa: F401 +from chocula.directories import * # noqa: F401 +from chocula.kbart import * # noqa: F401 diff --git a/chocula/__main__.py b/chocula/__main__.py index 92f2e6f..4eb1982 100644 --- a/chocula/__main__.py +++ b/chocula/__main__.py @@ -45,8 +45,8 @@ See TODO.md for more work-in-progress """ import sys -import csv import argparse +from typing import Optional from chocula import ( ChoculaDatabase, diff --git a/chocula/common.py b/chocula/common.py index 455649a..a87a736 100644 --- a/chocula/common.py +++ b/chocula/common.py @@ -3,7 +3,7 @@ import csv import datetime from typing import Iterable, Optional, Dict, Any, List from collections import Counter -from dataclasses import dataclass, field +from dataclasses import dataclass import ftfy diff --git a/chocula/database.py b/chocula/database.py index 11632b9..b89d8ba 100644 --- a/chocula/database.py +++ b/chocula/database.py @@ -1,7 +1,6 @@ from __future__ import annotations import sys -import csv import json import sqlite3 from collections import Counter @@ -11,7 +10,6 @@ from typing import List, Dict, Tuple, Optional, Any import urlcanon import surt import tldextract -import ftfy import stdnum.issn from chocula import * @@ -130,7 +128,7 @@ class DirectoryInfo: identifier TEXT, name TEXT, extra TEXT, - + Returns a tuple in that order. """ if not self.issnl: diff --git a/chocula/directories/sim.py b/chocula/directories/sim.py index 97f84d2..5dde9cc 100644 --- a/chocula/directories/sim.py +++ b/chocula/directories/sim.py @@ -3,14 +3,11 @@ import csv from chocula.util import ( clean_str, - parse_mimetypes, - parse_country, parse_lang, - PLATFORM_MAP, gaps_to_spans, ) from chocula.common import DirectoryLoader -from chocula.database import DirectoryInfo, HomepageUrl +from chocula.database import DirectoryInfo class SimLoader(DirectoryLoader): diff --git a/chocula/kbart.py b/chocula/kbart.py index e8094e3..e74e19f 100644 --- a/chocula/kbart.py +++ b/chocula/kbart.py @@ -1,4 +1,3 @@ -from typing import List, Any from chocula.common import KbartLoader diff --git a/chocula/util.py b/chocula/util.py index 11303b8..894af98 100644 --- a/chocula/util.py +++ b/chocula/util.py @@ -1,11 +1,9 @@ import sys -from dataclasses import dataclass -from typing import Dict, Optional +from typing import Optional import ftfy import pycountry -################### Utilities # NOTE: this is a partial list, focusing on non-publisher hosted platforms and # software frameworks |