From 9d739ccd65a6f26b9d417c4709b8f269d27c907f Mon Sep 17 00:00:00 2001 From: Sean Whalen Date: Sat, 3 Sep 2022 10:28:45 -0400 Subject: [PATCH] PEP 8 code style fixes --- build.sh | 17 +---------------- parsedmarc/cli.py | 3 ++- parsedmarc/kafkaclient.py | 1 + parsedmarc/mail/gmail.py | 3 ++- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/build.sh b/build.sh index 6f754cf..fc09a60 100755 --- a/build.sh +++ b/build.sh @@ -1,19 +1,4 @@ #!/usr/bin/env bash -set -e - . venv/bin/activate - -pip install -U -r requirements.txt -rstcheck --report-level warning README.rst -cd docs -make html -touch _build/html/.nojekyll -mkdir -p ../../parsedmarc-docs/ -cp -rf _build/html/* ../../parsedmarc-docs/ -cd .. -flake8 parsedmarc -flake8 tests.py -rm -rf dist/ build/ -python3 setup.py sdist -python3 setup.py bdist_wheel +pip3 install -U -r requirements.txt && cd docs && make html && cp -r _build/html/* ../../parsedmarc-docs/ && cd .. && flake8 parsedmarc && flake8 tests.py && python3 tests.py && rm -rf dist/ build/ && python3 setup.py sdist && python3 setup.py bdist_wheel diff --git a/parsedmarc/cli.py b/parsedmarc/cli.py index 820b1e6..fe093d9 100644 --- a/parsedmarc/cli.py +++ b/parsedmarc/cli.py @@ -420,7 +420,8 @@ def _main(): if "batch_size" in mailbox_config: opts.mailbox_batch_size = mailbox_config.getint("batch_size") if "check_timeout" in mailbox_config: - opts.mailbox_check_timeout = mailbox_config.getint("check_timeout") + opts.mailbox_check_timeout = mailbox_config.getint( + "check_timeout") if "imap" in config.sections(): imap_config = config["imap"] diff --git a/parsedmarc/kafkaclient.py b/parsedmarc/kafkaclient.py index 779746a..11a913b 100644 --- a/parsedmarc/kafkaclient.py +++ b/parsedmarc/kafkaclient.py @@ -11,6 +11,7 @@ from parsedmarc.utils import human_timestamp_to_datetime from parsedmarc import __version__ from parsedmarc.log import logger + class KafkaError(RuntimeError): """Raised when a Kafka error occurs""" diff --git a/parsedmarc/mail/gmail.py b/parsedmarc/mail/gmail.py index 58aed20..92ec431 100644 --- a/parsedmarc/mail/gmail.py +++ b/parsedmarc/mail/gmail.py @@ -27,7 +27,8 @@ def _get_creds(token_file, credentials_file, scopes, oauth2_port): else: flow = InstalledAppFlow.from_client_secrets_file( credentials_file, scopes) - creds = flow.run_local_server(open_browser=False, oauth2_port=oauth2_port) + creds = flow.run_local_server(open_browser=False, + oauth2_port=oauth2_port) # Save the credentials for the next run with Path(token_file).open('w') as token: token.write(creds.to_json())