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.
Attachments
For Gerrit Dashboard: PYSIDE-2748 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
560313,4 | Fix type hint of QTranslator.translate() | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
560511,2 | Fix type hint of QTranslator.translate() | 6.7 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
560517,2 | Fix type hint of QTranslator.translate() | tqtc/lts-6.5 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |