diff options
author | Alexey Stepanov <penguinolog@users.noreply.github.com> | 2023-05-09 09:13:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 09:13:40 +0200 |
commit | ffbfa07533809a523938d5e342ff7482a12dd5d0 (patch) | |
tree | f82251e47e72b9fe873f0eb20410c105387407b9 /urwid/curses_display.py | |
parent | d26cb42a9fd28cb0743ad04d5ed2a0c7f28b89e3 (diff) | |
download | urwid-master.tar.gz |
* Fix TextCanvas `CanvasError("Attribute extends beyond text...")
* `[[]] * ...` causes
list of 1 list with pointers
amount equal to multiplier
instead of "list of lists"
* Add 2 basic font tests which check for Canvas create issue
* Add few type annotations during debug process
Fix: #554
* Force tests to restore default encoding in tearDown
Tests order change should not cause tests failures
---------
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
Diffstat (limited to 'urwid/curses_display.py')
-rwxr-xr-x | urwid/curses_display.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/urwid/curses_display.py b/urwid/curses_display.py index e9519f7..86805f8 100755 --- a/urwid/curses_display.py +++ b/urwid/curses_display.py @@ -597,10 +597,10 @@ class _test: attr += [[],[],[]] cols,rows = self.ui.get_cols_rows() keys = None - while keys!=['q']: - r.text=([t.ljust(cols) for t in text]+[""]*rows)[:rows] - r.attr=(attr+[[]]*rows) [:rows] - self.ui.draw_screen((cols,rows),r) + while keys != ['q']: + r.text = ([t.ljust(cols) for t in text] + [""] * rows)[:rows] + r.attr = (attr + [[] for _ in range(rows)])[:rows] + self.ui.draw_screen((cols, rows), r) keys, raw = self.ui.get_input( raw_keys = True ) if 'window resize' in keys: cols, rows = self.ui.get_cols_rows() |