summaryrefslogtreecommitdiff
path: root/qutebrowser/misc
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-05-19 13:15:09 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-05-19 13:15:09 +0200
commitc01b47f27b46a8568096977363b38b01d138749c (patch)
treed0b47c3e9bebc757638f57a17a20e2cbc0332d15 /qutebrowser/misc
parent06e49efd3d9f21058893a0c3751aa05caaf0e2f8 (diff)
downloadqutebrowser-c01b47f27b46a8568096977363b38b01d138749c.tar.gz
qutebrowser-c01b47f27b46a8568096977363b38b01d138749c.zip
mypy: Set disallow_any_generics
See #6100
Diffstat (limited to 'qutebrowser/misc')
-rw-r--r--qutebrowser/misc/debugcachestats.py2
-rw-r--r--qutebrowser/misc/elf.py4
-rw-r--r--qutebrowser/misc/throttle.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/qutebrowser/misc/debugcachestats.py b/qutebrowser/misc/debugcachestats.py
index f172f0854..2004ad7ab 100644
--- a/qutebrowser/misc/debugcachestats.py
+++ b/qutebrowser/misc/debugcachestats.py
@@ -30,7 +30,7 @@ from typing import Any, Callable, List, Optional, Tuple, TypeVar
_CACHE_FUNCTIONS: List[Tuple[str, Any]] = []
-_T = TypeVar('_T', bound=Callable)
+_T = TypeVar('_T', bound=Callable[..., Any])
def register(name: Optional[str] = None) -> Callable[[_T], _T]:
diff --git a/qutebrowser/misc/elf.py b/qutebrowser/misc/elf.py
index 307d3b4ac..bf824880a 100644
--- a/qutebrowser/misc/elf.py
+++ b/qutebrowser/misc/elf.py
@@ -65,7 +65,7 @@ import re
import dataclasses
import mmap
import pathlib
-from typing import IO, ClassVar, Dict, Optional, Tuple, cast
+from typing import Any, IO, ClassVar, Dict, Optional, Tuple, cast
from PyQt5.QtCore import QLibraryInfo
@@ -93,7 +93,7 @@ class Endianness(enum.Enum):
big = 2
-def _unpack(fmt: str, fobj: IO[bytes]) -> Tuple:
+def _unpack(fmt: str, fobj: IO[bytes]) -> Tuple[Any, ...]:
"""Unpack the given struct format from the given file."""
size = struct.calcsize(fmt)
data = _safe_read(fobj, size)
diff --git a/qutebrowser/misc/throttle.py b/qutebrowser/misc/throttle.py
index 1beebe1aa..ac565b68d 100644
--- a/qutebrowser/misc/throttle.py
+++ b/qutebrowser/misc/throttle.py
@@ -45,7 +45,7 @@ class Throttle(QObject):
"""
def __init__(self,
- func: Callable,
+ func: Callable[..., None],
delay_ms: int,
parent: QObject = None) -> None:
"""Constructor.