diff --git a/.mypy.ini b/.mypy.ini index 59a3f8670..e315f0b13 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -20,6 +20,7 @@ strict_equality = True warn_unreachable = True disallow_any_unimported = True enable_error_code = ignore-without-code +strict_bytes = True ### Output show_error_context = True diff --git a/qutebrowser/misc/nativeeventfilter.py b/qutebrowser/misc/nativeeventfilter.py index 2b2d3f635..1933dc63f 100644 --- a/qutebrowser/misc/nativeeventfilter.py +++ b/qutebrowser/misc/nativeeventfilter.py @@ -137,7 +137,9 @@ class NativeEventFilter(QAbstractNativeEventFilter): xcb.xcb_disconnect(conn) def nativeEventFilter( - self, evtype: Union[bytes, QByteArray], message: Optional[sip.voidptr] + self, + evtype: Union[QByteArray, bytes, bytearray, memoryview], + message: Optional[sip.voidptr], ) -> tuple[bool, _PointerRetType]: """Handle XCB events.""" # We're only installed when the platform plugin is xcb