Fix typing errors
This commit is contained in:
@@ -1034,6 +1034,7 @@ class Tokenizer(ABC):
|
||||
|
||||
def _formatComment(self, style: ComStyle, key: str, text: str) -> tuple[str, T_Formats]:
|
||||
"""Apply formatting to comments and notes."""
|
||||
rFmt = []
|
||||
tTxt, tFmt = self._extractFormats(text)
|
||||
tFmt.insert(0, (0, TextFmt.COL_B, style.textClass))
|
||||
tFmt.append((len(tTxt), TextFmt.COL_E, ""))
|
||||
|
||||
@@ -598,6 +598,7 @@ class ToOdt(Tokenizer):
|
||||
def _textStyle(self, hFmt: int, fClass: str = "") -> str:
|
||||
"""Return a text style for a given style code."""
|
||||
tKey = str(hFmt)
|
||||
color = None
|
||||
if fClass and (color := self._classes.get(fClass)):
|
||||
tKey = f"{tKey}:{fClass}"
|
||||
if tKey in self._autoText:
|
||||
|
||||
Reference in New Issue
Block a user