Compare commits
4 Commits
33a321b9ff
...
3b02463bc1
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b02463bc1 | |||
| efdb4b513e | |||
| 9da19e19f5 | |||
| 8f9a0587d7 |
@ -45,7 +45,7 @@ class Question(str):
|
||||
"""
|
||||
A single question with a defined header.
|
||||
"""
|
||||
header: Final[str] = '=== QUESTION ==='
|
||||
header = '=== QUESTION ==='
|
||||
|
||||
def __new__(cls: Type[QuestionInst], string: str) -> QuestionInst:
|
||||
"""
|
||||
@ -67,7 +67,7 @@ class Answer(str):
|
||||
"""
|
||||
A single answer with a defined header.
|
||||
"""
|
||||
header: Final[str] = '=== ANSWER ==='
|
||||
header = '=== ANSWER ==='
|
||||
|
||||
def __new__(cls: Type[AnswerInst], string: str) -> AnswerInst:
|
||||
"""
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"""
|
||||
Module implementing tag related functions and classes.
|
||||
"""
|
||||
from typing import Type, TypeVar, Optional, Final
|
||||
from typing import Type, TypeVar, Optional
|
||||
|
||||
TagInst = TypeVar('TagInst', bound='Tag')
|
||||
TagLineInst = TypeVar('TagLineInst', bound='TagLine')
|
||||
@ -16,9 +16,9 @@ class Tag(str):
|
||||
A single tag. A string that can contain anything but the default separator (' ').
|
||||
"""
|
||||
# default separator
|
||||
default_separator: Final[str] = ' '
|
||||
default_separator = ' '
|
||||
# alternative separators (e. g. for backwards compatibility)
|
||||
alternative_separators: Final[list[str]] = [',']
|
||||
alternative_separators = [',']
|
||||
|
||||
def __new__(cls: Type[TagInst], string: str) -> TagInst:
|
||||
"""
|
||||
@ -98,7 +98,7 @@ class TagLine(str):
|
||||
the tags.
|
||||
"""
|
||||
# the prefix
|
||||
prefix: Final[str] = 'TAGS:'
|
||||
prefix = 'TAGS:'
|
||||
|
||||
def __new__(cls: Type[TagLineInst], string: str) -> TagLineInst:
|
||||
"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user