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