summaryrefslogtreecommitdiff
path: root/qutebrowser/components/scrollcommands.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-04-24 18:06:07 +0200
committerFlorian Bruhin <me@the-compiler.org>2022-04-24 18:10:10 +0200
commite2db790593eee8329fe8b168e82043bcbb19cbae (patch)
tree8d0690d20472bba48e4074c463019e0b6d0b2ee6 /qutebrowser/components/scrollcommands.py
parent65345eab9572fe2426eb8292aa4ab734c099576f (diff)
downloadqutebrowser-e2db790593eee8329fe8b168e82043bcbb19cbae.tar.gz
qutebrowser-e2db790593eee8329fe8b168e82043bcbb19cbae.zip
Diffstat (limited to 'qutebrowser/components/scrollcommands.py')
-rw-r--r--qutebrowser/components/scrollcommands.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/qutebrowser/components/scrollcommands.py b/qutebrowser/components/scrollcommands.py
index 757c23b2b..faa31a931 100644
--- a/qutebrowser/components/scrollcommands.py
+++ b/qutebrowser/components/scrollcommands.py
@@ -19,6 +19,7 @@
"""Scrolling-related commands."""
+from typing import Dict, Callable, Any
from qutebrowser.api import cmdutils, apitypes
@@ -54,7 +55,8 @@ def scroll(tab: apitypes.Tab, direction: str, count: int = 1) -> None:
(up/down/left/right/top/bottom).
count: multiplier
"""
- funcs = {
+ # FIXME:mypy Use a callback protocol to enforce having 'count'?
+ funcs: Dict[str, Callable[..., None]] = {
'up': tab.scroller.up,
'down': tab.scroller.down,
'left': tab.scroller.left,