From fab92ee38f0c34332b6966c669aba8f29881b589 Mon Sep 17 00:00:00 2001 From: Graham Lee Date: Mon, 20 Jun 2022 16:17:03 +0100 Subject: [PATCH] PEP8 #2714 --- .../reusable_data_service/model/case.py | 5 ++++- .../reusable_data_service/util/iso_json_encoder.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/data-serving/reusable-data-service/reusable_data_service/model/case.py b/data-serving/reusable-data-service/reusable_data_service/model/case.py index efc388082..133cec4fb 100644 --- a/data-serving/reusable-data-service/reusable_data_service/model/case.py +++ b/data-serving/reusable-data-service/reusable_data_service/model/case.py @@ -4,6 +4,7 @@ from typing import Any + @dataclasses.dataclass() class DayZeroCase: """This class implements the "day-zero" data schema for Global.health. @@ -31,7 +32,9 @@ def from_dict(cls, dictionary: dict[str, Any]) -> type: for key in dictionary: if key in ["confirmation_date"]: # parse as an ISO 8601 date - date_dt = datetime.datetime.strptime(dictionary[key], "%Y-%m-%dT%H:%M:%S.%fZ") + date_dt = datetime.datetime.strptime( + dictionary[key], "%Y-%m-%dT%H:%M:%S.%fZ" + ) date = date_dt.date() setattr(case, key, date) else: diff --git a/data-serving/reusable-data-service/reusable_data_service/util/iso_json_encoder.py b/data-serving/reusable-data-service/reusable_data_service/util/iso_json_encoder.py index dabbef994..4b4456624 100644 --- a/data-serving/reusable-data-service/reusable_data_service/util/iso_json_encoder.py +++ b/data-serving/reusable-data-service/reusable_data_service/util/iso_json_encoder.py @@ -1,6 +1,7 @@ import flask.json import datetime + class ISOJSONEncoder(flask.json.JSONEncoder): def default(self, obj): try: