mirror of https://github.com/kianby/stacosys
stop using typing module. Python 3.9 required.
parent
3382a0a3f4
commit
75ee7acb6d
@ -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
|
||||
|
Loading…
Reference in New Issue