From 5345dd267479f05c88ee1386ba876d69d140ae4d Mon Sep 17 00:00:00 2001 From: valeros Date: Thu, 24 Oct 2019 21:35:04 +0300 Subject: [PATCH] Give a proper name to method that converts defect item to dict --- platformio/commands/check/command.py | 2 +- platformio/commands/check/defect.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio/commands/check/command.py b/platformio/commands/check/command.py index 2542ce17..03e5a018 100644 --- a/platformio/commands/check/command.py +++ b/platformio/commands/check/command.py @@ -165,7 +165,7 @@ def results_to_json(raw): { "ignored": item.get("succeeded") is None, "succeeded": bool(item.get("succeeded")), - "defects": [d.to_json() for d in item.get("defects", [])] + "defects": [d.as_dict() for d in item.get("defects", [])] } ) results.append(item) diff --git a/platformio/commands/check/defect.py b/platformio/commands/check/defect.py index adef3666..c28e60c1 100644 --- a/platformio/commands/check/defect.py +++ b/platformio/commands/check/defect.py @@ -81,7 +81,7 @@ class DefectItem(object): return key raise Exception("Unknown severity label -> %s" % label) - def to_json(self): + def as_dict(self): return { "severity": self.SEVERITY_LABELS[self.severity], "category": self.category,