Details
-
Bug
-
Resolution: Fixed
-
P4: Low
-
6.7.0
-
None
-
-
217696754 (dev), 6d4f624e0 (6.7), e3a36b8ee (tqtc/lts-6.5)
Description
PySide6.QtCore.QTranslator.translate type hint is incorrect.
I believe this method only accepts strings but it is typed as Union[bytes, bytearray, memoryview]
Current signature
PySide6.QtCore.QTranslator.translate(Union[bytes, bytearray, memoryview], Union[bytes, bytearray, memoryview], Union[bytes, bytearray, memoryview, NoneType] = None, int = -1)
What I believe is the correct signature
PySide6.QtCore.QTranslator.translate(str, str, Optional[str] = None, int = -1)
Either that or this function should not error when given bytes, bytearray or memoryview.