From 75ee7acb6d4fae238d8cdff9799a1c36d8ce2a65 Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Tue, 19 Jan 2021 19:01:20 +0100 Subject: [PATCH] stop using typing module. Python 3.9 required. --- stacosys/model/email.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/stacosys/model/email.py b/stacosys/model/email.py index 8852506..c3feb34 100644 --- a/stacosys/model/email.py +++ b/stacosys/model/email.py @@ -1,29 +1,27 @@ #!/usr/bin/python # -*- coding: UTF-8 -*- -from typing import NamedTuple -from typing import List from datetime import datetime -class Part(NamedTuple): +class Part(): content: str content_type: str -class Attachment(NamedTuple): +class Attachment(): filename: str content: str content_type: str -class Email(NamedTuple): +class Email(): id: int encoding: str date: datetime from_addr: str to_addr: str subject: str - parts: List[Part] - attachments: List[Attachment] + parts: list[Part] + attachments: list[Attachment] plain_text_content: str