PEP 8 code style fixes

This commit is contained in:
Sean Whalen
2022-09-03 10:28:45 -04:00
parent 4f53894ce1
commit 9d739ccd65
4 changed files with 6 additions and 18 deletions
+1 -16
View File
@@ -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
+2 -1
View File
@@ -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"]
+1
View File
@@ -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"""
+2 -1
View File
@@ -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())