From f349bdc628bd85a5904a3620b2cc3ca2324f6b42 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont (@ardumont)" <ardumont@softwareheritage.org> Date: Mon, 22 Jun 2020 10:14:30 +0200 Subject: [PATCH] swh.model.model.OriginVisit: Drop the dateutil.parser.parse use --- swh/model/model.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/swh/model/model.py b/swh/model/model.py index efb9039b..c6f09633 100644 --- a/swh/model/model.py +++ b/swh/model/model.py @@ -252,14 +252,6 @@ class OriginVisit(BaseModel): del ov["visit"] return ov - @classmethod - def from_dict(cls, d): - """Parses the date from a string, and accepts missing visit ids.""" - if isinstance(d["date"], str): - d = d.copy() - d["date"] = dateutil.parser.parse(d["date"]) - return super().from_dict(d) - @attr.s(frozen=True) class OriginVisitStatus(BaseModel): -- GitLab