PEP8 style fixes

This commit is contained in:
Sean Whalen
2022-01-05 10:59:00 -05:00
parent 8259f6866f
commit dcdc210ab6
5 changed files with 11 additions and 7 deletions
+3 -3
View File
@@ -36,6 +36,9 @@ jobs:
run: |
cd docs
make html
- name: Check code style
run: |
flake8 *.py parsedmarc/*.py
- name: Run unit tests
run: |
coverage run tests.py
@@ -45,9 +48,6 @@ jobs:
python setup.py install
parsedmarc --debug -c ci.ini samples/aggregate/*
parsedmarc --debug -c ci.ini samples/forensic/*"
- name: Check code style
run: |
flake8 *.py parsedmarc/*.py
- name: Test building packages
run: |
python3 setup.py sdist
+2 -1
View File
@@ -397,7 +397,8 @@ def extract_xml(input_):
return xml
def parse_aggregate_report_file(_input, offline=False, ip_db_path=None, nameservers=None,
def parse_aggregate_report_file(_input, offline=False, ip_db_path=None,
nameservers=None,
dns_timeout=2.0,
parallel=False,
server=None):
+2 -1
View File
@@ -695,7 +695,8 @@ def _main():
dns_timeout=opts.dns_timeout,
strip_attachment_payloads=strip,
ip_db_path=opts.ip_db_path,
offline=opts.offline, parallel=False)
offline=opts.offline,
parallel=False)
aggregate_reports += reports["aggregate_reports"]
forensic_reports += reports["forensic_reports"]
+2 -1
View File
@@ -4,7 +4,8 @@ import logging
import logging.handlers
import json
from parsedmarc import parsed_aggregate_reports_to_csv_rows, parsed_forensic_reports_to_csv_rows
from parsedmarc import parsed_aggregate_reports_to_csv_rows,\
parsed_forensic_reports_to_csv_rows
logger = logging.getLogger("parsedmarc")
+2 -1
View File
@@ -301,7 +301,8 @@ def get_ip_address_country(ip_address, db_path=None):
break
if db_path is None:
with pkg_resources.path(parsedmarc.resources, "dbip-country-lite.mmdb") as path:
with pkg_resources.path(parsedmarc.resources,
"dbip-country-lite.mmdb") as path:
db_path = path
db_age = datetime.now() - datetime.fromtimestamp(