Skip to content

Commit e7bc985

Browse files
committed
fix types (strange mypy bug)
1 parent 2790eac commit e7bc985

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/prompt_toolkit/input/kitty_keyboard.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,13 @@ def _apply_modifiers(base: Keys, ctrl: bool, shift: bool) -> Keys:
275275
if shift:
276276
return Keys.ShiftEscape
277277
return Keys.Escape
278-
ctrl_key: Keys | None
278+
_ctrl_key: Keys | None
279279
if base in _NAV_MAP:
280-
shift_key, ctrl_key, ctrl_shift_key = _NAV_MAP[base]
280+
shift_key, _ctrl_key, ctrl_shift_key = _NAV_MAP[base]
281281
if ctrl and shift:
282282
return ctrl_shift_key
283283
if ctrl:
284-
return ctrl_key
284+
return _ctrl_key
285285
if shift:
286286
return shift_key
287287
return base
@@ -291,7 +291,7 @@ def _apply_modifiers(base: Keys, ctrl: bool, shift: bool) -> Keys:
291291
# emulate that here; Shift+Fn just returns Fn for now.
292292
if base.value.startswith("f") and base.value[1:].isdigit():
293293
if ctrl:
294-
ctrl_key = getattr(Keys, "Control" + base.name, None)
294+
ctrl_key: Keys | None = getattr(Keys, "Control" + base.name, None)
295295
if ctrl_key is not None:
296296
return ctrl_key
297297
return base

0 commit comments

Comments
 (0)