diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-10-12 21:08:55 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-10-12 21:08:55 +0200 |
commit | ba39bdcdd99b6ed65bdd3902d080f9a593c9fd98 (patch) | |
tree | 792cf4798db0409ff91bfb8bf8e6e37963689219 | |
parent | f627f4e7ae32bae570447b0d8004787199a1d962 (diff) | |
download | qutebrowser-ba39bdcdd99b6ed65bdd3902d080f9a593c9fd98.tar.gz qutebrowser-ba39bdcdd99b6ed65bdd3902d080f9a593c9fd98.zip |
Fix lint
-rw-r--r-- | qutebrowser/utils/qtutils.py | 4 | ||||
-rw-r--r-- | qutebrowser/utils/usertypes.py | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/qutebrowser/utils/qtutils.py b/qutebrowser/utils/qtutils.py index 97742a968..a05daa40e 100644 --- a/qutebrowser/utils/qtutils.py +++ b/qutebrowser/utils/qtutils.py @@ -402,8 +402,8 @@ class PyQIODevice(io.BufferedIOBase): return self.dev.isWritable() def write( # type: ignore[override] - self, - data: typing.Union[bytes, bytearray] + self, + data: typing.Union[bytes, bytearray] ) -> int: self._check_open() self._check_writable() diff --git a/qutebrowser/utils/usertypes.py b/qutebrowser/utils/usertypes.py index 6d5c2f23e..ae47155ce 100644 --- a/qutebrowser/utils/usertypes.py +++ b/qutebrowser/utils/usertypes.py @@ -33,8 +33,13 @@ from qutebrowser.utils import log, qtutils, utils if typing.TYPE_CHECKING: # Protocol was added in Python 3.8 from typing import Protocol, Any + class SupportsLessThan(Protocol): - def __lt__(self, other: Any) -> bool: ... + + """Protocol for the _T TypeVar below.""" + + def __lt__(self, other: Any) -> bool: + ... _T = typing.TypeVar('_T', bound='SupportsLessThan') |