mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-05 11:35:25 +00:00
PEP8 style fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
@@ -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"]
|
||||
|
||||
|
||||
@@ -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
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user