stop using typing module. Python 3.9 required.
This commit is contained in:
parent
3d818ad417
commit
af414d11e1
1 changed files with 5 additions and 7 deletions
|
@ -1,29 +1,27 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
from typing import NamedTuple
|
|
||||||
from typing import List
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
class Part(NamedTuple):
|
class Part():
|
||||||
content: str
|
content: str
|
||||||
content_type: str
|
content_type: str
|
||||||
|
|
||||||
|
|
||||||
class Attachment(NamedTuple):
|
class Attachment():
|
||||||
filename: str
|
filename: str
|
||||||
content: str
|
content: str
|
||||||
content_type: str
|
content_type: str
|
||||||
|
|
||||||
|
|
||||||
class Email(NamedTuple):
|
class Email():
|
||||||
id: int
|
id: int
|
||||||
encoding: str
|
encoding: str
|
||||||
date: datetime
|
date: datetime
|
||||||
from_addr: str
|
from_addr: str
|
||||||
to_addr: str
|
to_addr: str
|
||||||
subject: str
|
subject: str
|
||||||
parts: List[Part]
|
parts: list[Part]
|
||||||
attachments: List[Attachment]
|
attachments: list[Attachment]
|
||||||
plain_text_content: str
|
plain_text_content: str
|
||||||
|
|
Loading…
Add table
Reference in a new issue