Skip to content

Commit cad8aaf

Browse files
committed
tidier expression
1 parent 09e19f0 commit cad8aaf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/textual/canvas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ def __init__(self, width: int, height: int) -> None:
158158
self._width = width
159159
self._height = height
160160
blank_line = " " * width
161+
array_type_code = "w" if sys.version_info >= (3, 13) else "u"
161162
self.lines: list[array[str]] = [
162-
array("w" if sys.version_info >= (3, 13) else "u", blank_line)
163-
for _ in range(height)
163+
array(array_type_code, blank_line) for _ in range(height)
164164
]
165165
self.box: list[defaultdict[int, Quad]] = [
166166
defaultdict(lambda: (0, 0, 0, 0)) for _ in range(height)

0 commit comments

Comments
 (0)