Compare commits
4 Commits
3b02463bc1
...
d3799efeb3
| Author | SHA1 | Date | |
|---|---|---|---|
| d3799efeb3 | |||
| 8e8bc6345c | |||
| 87d8be2fda | |||
| 514eb99302 |
@ -2,8 +2,8 @@
|
|||||||
Module implementing message related functions and classes.
|
Module implementing message related functions and classes.
|
||||||
"""
|
"""
|
||||||
import pathlib
|
import pathlib
|
||||||
from typing import Type, TypeVar, Optional, Any, Final
|
from typing import Type, TypeVar, Optional, Any
|
||||||
from dataclasses import dataclass, asdict, field
|
from dataclasses import dataclass, asdict
|
||||||
from .tags import Tag
|
from .tags import Tag
|
||||||
|
|
||||||
QuestionInst = TypeVar('QuestionInst', bound='Question')
|
QuestionInst = TypeVar('QuestionInst', bound='Question')
|
||||||
@ -95,7 +95,7 @@ class Message():
|
|||||||
answer: Optional[Answer]
|
answer: Optional[Answer]
|
||||||
tags: Optional[set[Tag]]
|
tags: Optional[set[Tag]]
|
||||||
file_path: Optional[pathlib.Path]
|
file_path: Optional[pathlib.Path]
|
||||||
file_suffixes: Final[list[str]] = field(default_factory=lambda: ['.txt', '.yaml'])
|
file_suffixes: list[str] = ['.txt', '.yaml']
|
||||||
|
|
||||||
# @classmethod
|
# @classmethod
|
||||||
# def from_file(cls: Type[MessageInst], file_path: pathlib.Path) -> MessageInst:
|
# def from_file(cls: Type[MessageInst], file_path: pathlib.Path) -> MessageInst:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user