chore: clear typehinting errors

This commit is contained in:
aclist 2026-05-11 00:51:58 +09:00
parent 4b291c8cd0
commit 319966f8e1

View File

@ -9,20 +9,25 @@ from gi.repository import Gtk, GLib, Gdk, GObject, Pango # noqa E402
class CursorMixin: class CursorMixin:
def _vim_nav(self, event: Gdk.EventKey): def _vim_nav(self, event: Gdk.EventKey) -> bool:
match event.keyval: match event.keyval:
case Gdk.KEY_g: case Gdk.KEY_g:
self._move_cursor(CursorPosition.TOP) self._move_cursor(CursorPosition.TOP)
return True
case Gdk.KEY_G: case Gdk.KEY_G:
self._move_cursor(CursorPosition.BOTTOM) self._move_cursor(CursorPosition.BOTTOM)
return True
case Gdk.KEY_j: case Gdk.KEY_j:
self._move_cursor(CursorPosition.DOWN) self._move_cursor(CursorPosition.DOWN)
return True
case Gdk.KEY_k: case Gdk.KEY_k:
self._move_cursor(CursorPosition.UP) self._move_cursor(CursorPosition.UP)
return True
case Gdk.KEY_l | Gdk.KEY_Right: case Gdk.KEY_l | Gdk.KEY_Right:
if is_ctrl_mask(event): if is_ctrl_mask(event):
return return False
self.emitter.emit("request_button_box_focus") # type: ignore self.emitter.emit("request_button_box_focus") # type: ignore
return True
case _: case _:
return False return False
@ -56,5 +61,4 @@ class CursorMixin:
dest = end dest = end
path = Gtk.TreePath.new_from_indices([dest]) path = Gtk.TreePath.new_from_indices([dest])
self.set_cursor(path) # type: ignore self.set_cursor(path) # type: ignore return True
return True