Repository navigation
Refactoring: remove dead code from Raw display - #707
Conversation
|
|
||
| super()._stop() | ||
|
|
||
| @typing.overload |
There was a problem hiding this comment.
duplicate from base class
| b |= mod | ||
| result.extend([27, ord("["), ord("M"), b + 32, x + 32, y + 32]) | ||
|
|
||
| def determine_button_release(flag: int) -> None: |
There was a problem hiding this comment.
not used and unreachable from outside
| signals.connect_signal(self, UPDATE_PALETTE_ENTRY, self._on_update_palette_entry) | ||
| self.colors: Literal[1, 16, 88, 256, 16777216] = 16 # FIXME: detect this | ||
| self.has_underline = True # FIXME: detect this | ||
| self._keyqueue = [] |
There was a problem hiding this comment.
not used across whole project
| return escape.set_cursor_position(0, 0) | ||
| return escape.CURSOR_HOME_COL + escape.move_cursor_up(cy) | ||
|
|
||
| def set_cursor_row(y): |
There was a problem hiding this comment.
not used and unreachable from outside
| if mono is None: | ||
| mono = DEFAULT | ||
| mono = AttrSpec(mono, DEFAULT, 1) | ||
| mono_spec = AttrSpec(mono, DEFAULT, 1) |
There was a problem hiding this comment.
do not replace variable and not confuse static analysis
Pull Request Test Coverage Report for Build 7209892230
💛 - Coveralls |
| self.has_color = False | ||
| self.s = None | ||
| self.cursor_state = None | ||
| self._keyqueue = [] |
There was a problem hiding this comment.
not used across whole project
| SAFE_ASCII_BYTES_RE = re.compile(b"^[ -~]*$") | ||
|
|
||
| _byte_encoding = None | ||
| _byte_encoding: Literal["utf8", "narrow", "wide"] = "narrow" |
There was a problem hiding this comment.
use correct default value with minimal functionality
f4ade73 to
2f84f69
Compare
| pass | ||
|
|
||
| @abc.abstractmethod | ||
| def draw_screen(self, size: tuple[int, int], r: Canvas) -> None: |
There was a problem hiding this comment.
method is ultimately used by MainLoop - require to implement
* CursesDisplay: stop using private namespace `_curses` for exceptions * Mass add typing for better static logic trace
2f84f69 to
99aca4b
Compare
|
|
||
| Default (fallback) is 80x24. | ||
| """ | ||
| return 24, 80 |
There was a problem hiding this comment.
docstring says columns, rows but return value suggests rows, columns
There was a problem hiding this comment.
the original code removed above returned 80, 24
_cursesfor exceptionsChecklist
masterorpython-dual-supportbranchtoxsuccessfully in local environment