diff options
author | Alexey Stepanov <penguinolog@users.noreply.github.com> | 2023-04-04 13:31:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-04 13:31:23 +0200 |
commit | 3cfa240252ab1efc74772ae45d8c6efe0b4acb39 (patch) | |
tree | 057956da0f02c903685e75efc2d294e67a9f748a /urwid/main_loop.py | |
parent | 2d27ffc2bebc6436fc38ee3f1b3828635dc976a3 (diff) | |
download | urwid-3cfa240252ab1efc74772ae45d8c6efe0b4acb39.tar.gz |
Annotate types in simple cases and use isinstance (& protocol) based type checking (#529)
* Use `super()` where possible instead of direct base class
Related #525
Partial #406
Fix #510
Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
Diffstat (limited to 'urwid/main_loop.py')
-rwxr-xr-x | urwid/main_loop.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/urwid/main_loop.py b/urwid/main_loop.py index 0d91a60..8cee637 100755 --- a/urwid/main_loop.py +++ b/urwid/main_loop.py @@ -507,8 +507,7 @@ class MainLoop: if is_mouse_event(k): event, button, col, row = k if hasattr(self._topmost_widget, "mouse_event"): - if self._topmost_widget.mouse_event(self.screen_size, - event, button, col, row, focus=True): + if self._topmost_widget.mouse_event(self.screen_size, event, button, col, row, focus=True): k = None elif self._topmost_widget.selectable(): k = self._topmost_widget.keypress(self.screen_size, k) @@ -1185,7 +1184,7 @@ class TwistedInputDescriptor(FileDescriptor): def __init__(self, reactor, fd, cb): self._fileno = fd self.cb = cb - FileDescriptor.__init__(self, reactor) + super().__init__(reactor) def fileno(self): return self._fileno |