mypy: Enable new strict_bytes option

See https://peps.python.org/pep-0688/#no-special-meaning-for-bytes
This commit is contained in:
Florian Bruhin 2025-02-17 10:21:35 +01:00
parent eb2e39de1e
commit 0eff340063
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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