From 9a64b494e77a94be77cd1ac1f26ff50fbc545c96 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 21:45:21 +0000 Subject: [PATCH] Fix code review issues: incomplete isinstance and variable name mismatch Co-authored-by: seanthegeek <44679+seanthegeek@users.noreply.github.com> --- parsedmarc/__init__.py | 2 +- parsedmarc/kafkaclient.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index 78db145..eb6cfab 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -1632,7 +1632,7 @@ def parse_report_email( if isinstance(payload, bytes): payload = payload.decode("utf-8", errors="replace") if payload.strip().startswith("{"): - result = parse_smtp_tls_report_json(payload) + smtp_tls_report = parse_smtp_tls_report_json(payload) result = { "report_type": "smtp_tls", "report": smtp_tls_report, diff --git a/parsedmarc/kafkaclient.py b/parsedmarc/kafkaclient.py index 06c2962..06b1183 100644 --- a/parsedmarc/kafkaclient.py +++ b/parsedmarc/kafkaclient.py @@ -110,9 +110,7 @@ class KafkaClient(object): aggregate_topic (str): The name of the Kafka topic """ - if isinstance(aggregate_reports, dict) or isinstance( - aggregate_reports - ): + if isinstance(aggregate_reports, dict): aggregate_reports = [aggregate_reports] if len(aggregate_reports) < 1: