summaryrefslogtreecommitdiff
path: root/qutebrowser/components
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/components')
-rw-r--r--qutebrowser/components/misccommands.py2
-rw-r--r--qutebrowser/components/readlinecommands.py2
-rw-r--r--qutebrowser/components/scrollcommands.py4
3 files changed, 5 insertions, 3 deletions
diff --git a/qutebrowser/components/misccommands.py b/qutebrowser/components/misccommands.py
index fe908b7d2..c20e8e290 100644
--- a/qutebrowser/components/misccommands.py
+++ b/qutebrowser/components/misccommands.py
@@ -83,7 +83,7 @@ def _print_preview(tab: apitypes.Tab) -> None:
diag = QPrintPreviewDialog(tab)
diag.setAttribute(Qt.WA_DeleteOnClose)
diag.setWindowFlags(
- diag.windowFlags() | # type: ignore[operator, arg-type]
+ diag.windowFlags() |
Qt.WindowMaximizeButtonHint |
Qt.WindowMinimizeButtonHint)
diag.paintRequested.connect(functools.partial(
diff --git a/qutebrowser/components/readlinecommands.py b/qutebrowser/components/readlinecommands.py
index 4ac03041c..a0631f3d1 100644
--- a/qutebrowser/components/readlinecommands.py
+++ b/qutebrowser/components/readlinecommands.py
@@ -42,7 +42,7 @@ class _ReadlineBridge:
"""Get the currently active QLineEdit."""
# FIXME add this to api.utils or so
qapp = QApplication.instance()
- assert qapp is not None
+ assert isinstance(qapp, QApplication)
w = qapp.focusWidget()
if isinstance(w, QLineEdit):
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,