mypy: Enable new strict_bytes option
See https://peps.python.org/pep-0688/#no-special-meaning-for-bytes
This commit is contained in:
parent
eb2e39de1e
commit
0eff340063
|
|
@ -20,6 +20,7 @@ strict_equality = True
|
||||||
warn_unreachable = True
|
warn_unreachable = True
|
||||||
disallow_any_unimported = True
|
disallow_any_unimported = True
|
||||||
enable_error_code = ignore-without-code
|
enable_error_code = ignore-without-code
|
||||||
|
strict_bytes = True
|
||||||
|
|
||||||
### Output
|
### Output
|
||||||
show_error_context = True
|
show_error_context = True
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,9 @@ class NativeEventFilter(QAbstractNativeEventFilter):
|
||||||
xcb.xcb_disconnect(conn)
|
xcb.xcb_disconnect(conn)
|
||||||
|
|
||||||
def nativeEventFilter(
|
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]:
|
) -> tuple[bool, _PointerRetType]:
|
||||||
"""Handle XCB events."""
|
"""Handle XCB events."""
|
||||||
# We're only installed when the platform plugin is xcb
|
# We're only installed when the platform plugin is xcb
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue