Skip to content

Commit

Permalink
PEP 8 code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Whalen committed Sep 3, 2022
1 parent 4f53894 commit 9d739cc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
17 changes: 1 addition & 16 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion parsedmarc/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ def process_reports(reports_):
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"]
Expand Down
1 change: 1 addition & 0 deletions parsedmarc/kafkaclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from parsedmarc import __version__
from parsedmarc.log import logger


class KafkaError(RuntimeError):
"""Raised when a Kafka error occurs"""

Expand Down
3 changes: 2 additions & 1 deletion parsedmarc/mail/gmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 9d739cc

Please sign in to comment.