summaryrefslogtreecommitdiff
path: root/poezio/ui
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-03-14 22:31:22 +0100
committermathieui <mathieui@mathieui.net>2021-04-02 17:44:36 +0200
commit4b198be9771594a28824cc082e737fe15ab681ec (patch)
tree01de648647136734d176ba0fa33e96a61bbafc88 /poezio/ui
parentbc4f4f1e0766aedb6b0e9f3df90fee9ea841786c (diff)
downloadpoezio-4b198be9771594a28824cc082e737fe15ab681ec.tar.gz
poezio-4b198be9771594a28824cc082e737fe15ab681ec.tar.bz2
poezio-4b198be9771594a28824cc082e737fe15ab681ec.tar.xz
poezio-4b198be9771594a28824cc082e737fe15ab681ec.zip
fix: tons of type errors
Diffstat (limited to 'poezio/ui')
-rw-r--r--poezio/ui/render.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/poezio/ui/render.py b/poezio/ui/render.py
index 13e493f1..f377df7f 100644
--- a/poezio/ui/render.py
+++ b/poezio/ui/render.py
@@ -10,6 +10,7 @@ from functools import singledispatch
from math import ceil, log10
from typing import (
List,
+ Optional,
Tuple,
TYPE_CHECKING,
)
@@ -52,7 +53,8 @@ class Line:
LinePos = Tuple[int, int]
-def generate_lines(lines: List[LinePos], msg: BaseMessage, default_color: str = '') -> List[Line]:
+
+def generate_lines(lines: List[LinePos], msg: BaseMessage, default_color: str = '') -> List[Line]:
line_objects = []
attrs: List[str] = []
prepend = default_color if default_color else ''
@@ -131,6 +133,7 @@ def write_pre_message(msg: Message, win: Win, with_timestamps: bool, nick_size:
- nick (with a "* " for /me)
- LMC number if present
"""
+ color: Optional[Tuple]
offset = 0
if with_timestamps:
offset += PreMessageHelpers.write_time(win, msg.history, msg.time)