From e9568d9d973df345966c71149757868cdf297179 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 1 Jul 2020 18:34:57 -0700 Subject: lint (flake8) top-level python files --- python/fatcat_cleanup.py | 4 +++- python/fatcat_export.py | 6 +----- python/fatcat_import.py | 4 +++- python/fatcat_review.py | 3 +-- python/fatcat_transform.py | 10 +--------- python/fatcat_util.py | 7 +------ python/fatcat_worker.py | 1 - python/shell.py | 1 + 8 files changed, 11 insertions(+), 25 deletions(-) (limited to 'python') diff --git a/python/fatcat_cleanup.py b/python/fatcat_cleanup.py index d8b2aea2..4e11139e 100755 --- a/python/fatcat_cleanup.py +++ b/python/fatcat_cleanup.py @@ -1,6 +1,8 @@ #!/usr/bin/env python3 -import os, sys, argparse +import os +import sys +import argparse import raven from fatcat_tools import authenticated_api diff --git a/python/fatcat_export.py b/python/fatcat_export.py index 5419e46c..763c217e 100755 --- a/python/fatcat_export.py +++ b/python/fatcat_export.py @@ -11,11 +11,7 @@ import sys import json import argparse -import fatcat_openapi_client -from fatcat_openapi_client.rest import ApiException -from fatcat_openapi_client import ReleaseEntity, ContainerEntity, ChangelogEntry -from fatcat_tools import uuid2fcid, entity_from_json, entity_to_dict, \ - public_api +from fatcat_tools import uuid2fcid, entity_to_dict, public_api def run_export_releases(args): diff --git a/python/fatcat_import.py b/python/fatcat_import.py index 331cf791..252ab3a5 100755 --- a/python/fatcat_import.py +++ b/python/fatcat_import.py @@ -1,6 +1,8 @@ #!/usr/bin/env python3 -import os, sys, argparse +import os +import sys +import argparse import raven from fatcat_tools import authenticated_api diff --git a/python/fatcat_review.py b/python/fatcat_review.py index 1d1db9a5..a10fc34b 100755 --- a/python/fatcat_review.py +++ b/python/fatcat_review.py @@ -2,11 +2,10 @@ import sys import argparse -import datetime import raven from fatcat_tools import authenticated_api -from fatcat_tools.reviewers import DummyReviewBot, ReviewBot +from fatcat_tools.reviewers import DummyReviewBot # Yep, a global. Gets DSN from `SENTRY_DSN` environment variable sentry_client = raven.Client() diff --git a/python/fatcat_transform.py b/python/fatcat_transform.py index 14595670..8e01c860 100755 --- a/python/fatcat_transform.py +++ b/python/fatcat_transform.py @@ -9,16 +9,8 @@ import sys import json import argparse -from citeproc import CitationStylesStyle, CitationStylesBibliography -from citeproc import Citation, CitationItem -from citeproc import formatter -from citeproc.source.json import CiteProcJSON -from citeproc_styles import get_style_filepath - -import fatcat_openapi_client -from fatcat_openapi_client.rest import ApiException from fatcat_openapi_client import ReleaseEntity, ContainerEntity, FileEntity, ChangelogEntry -from fatcat_tools import uuid2fcid, entity_from_json, entity_to_dict, \ +from fatcat_tools import entity_from_json, \ release_to_elasticsearch, container_to_elasticsearch, \ file_to_elasticsearch, changelog_to_elasticsearch, public_api, \ release_to_csl, citeproc_csl diff --git a/python/fatcat_util.py b/python/fatcat_util.py index d6e76697..a45b2ba4 100755 --- a/python/fatcat_util.py +++ b/python/fatcat_util.py @@ -8,14 +8,9 @@ TODO: """ import sys -import json import argparse -import fatcat_openapi_client -from fatcat_openapi_client.rest import ApiException -from fatcat_openapi_client import ReleaseEntity, ContainerEntity, ChangelogEntry -from fatcat_tools import uuid2fcid, fcid2uuid, entity_from_json, \ - entity_to_dict, public_api, authenticated_api +from fatcat_tools import uuid2fcid, fcid2uuid, authenticated_api def run_uuid2fcid(args): diff --git a/python/fatcat_worker.py b/python/fatcat_worker.py index 03167a3a..19ac16cd 100755 --- a/python/fatcat_worker.py +++ b/python/fatcat_worker.py @@ -2,7 +2,6 @@ import sys import argparse -import datetime import raven from fatcat_tools import public_api diff --git a/python/shell.py b/python/shell.py index c207a325..d53911b9 100644 --- a/python/shell.py +++ b/python/shell.py @@ -1,3 +1,4 @@ +# flake8: noqa # bunch of libraries one might want import uuid -- cgit v1.2.3