From 4c5a266f19abe261c45eb5eed1031d3449ecf12d Mon Sep 17 00:00:00 2001 From: Sean Whalen <44679+seanthegeek@users.noreply.github.com> Date: Sun, 20 Jun 2021 19:07:18 -0400 Subject: [PATCH] PEP 8 fixes --- parsedmarc/__init__.py | 8 ++++---- parsedmarc/cli.py | 12 ++++++++---- parsedmarc/elastic.py | 6 ++++-- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index f601b7a..d798225 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -1284,10 +1284,10 @@ def save_output(results, output_directory="output", Args: results (OrderedDict): Parsing results output_directory (str): The patch to the directory to save in - aggregate_json_filename (str): Output filename for the aggregate JSON report - forensic_json_filename (str): Output filename for the forensic JSON report - aggregate_csv_filename (str): Output filename for the aggregate CSV report - forensic_csv_filename (str): Output filename for the forensic CSV report + aggregate_json_filename (str): Filename for the aggregate JSON file + forensic_json_filename (str): Filename for the forensic JSON file + aggregate_csv_filename (str): Filename for the aggregate CSV file + forensic_csv_filename (str): Filename for the forensic CSV file """ aggregate_reports = results["aggregate_reports"] diff --git a/parsedmarc/cli.py b/parsedmarc/cli.py index ae739fe..374e6af 100644 --- a/parsedmarc/cli.py +++ b/parsedmarc/cli.py @@ -303,13 +303,17 @@ def _main(): if "output" in general_config: opts.output = general_config["output"] if "aggregate_json_filename" in general_config: - opts.aggregate_json_filename = general_config["aggregate_json_filename"] + opts.aggregate_json_filename = general_config[ + "aggregate_json_filename"] if "forensic_json_filename" in general_config: - opts.forensic_json_filename = general_config["forensic_json_filename"] + opts.forensic_json_filename = general_config[ + "forensic_json_filename"] if "aggregate_csv_filename" in general_config: - opts.aggregate_csv_filename = general_config["aggregate_csv_filename"] + opts.aggregate_csv_filename = general_config[ + "aggregate_csv_filename"] if "forensic_csv_filename" in general_config: - opts.forensic_csv_filename = general_config["forensic_csv_filename"] + opts.forensic_csv_filename = general_config[ + "forensic_csv_filename"] if "nameservers" in general_config: opts.nameservers = _str_to_list(general_config["nameservers"]) if "dns_timeout" in general_config: diff --git a/parsedmarc/elastic.py b/parsedmarc/elastic.py index 992d02c..7085983 100644 --- a/parsedmarc/elastic.py +++ b/parsedmarc/elastic.py @@ -301,8 +301,10 @@ def save_aggregate_report_to_elasticsearch(aggregate_report, org_name = metadata["org_name"] report_id = metadata["report_id"] domain = aggregate_report["policy_published"]["domain"] - begin_date = human_timestamp_to_datetime(metadata["begin_date"], to_utc=True) - end_date = human_timestamp_to_datetime(metadata["end_date"], to_utc=True) + begin_date = human_timestamp_to_datetime(metadata["begin_date"], + to_utc=True) + end_date = human_timestamp_to_datetime(metadata["end_date"], + to_utc=True) begin_date_human = begin_date.strftime("%Y-%m-%d %H:%M:%SZ") end_date_human = end_date.strftime("%Y-%m-%d %H:%M:%SZ") if monthly_indexes: