Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.15.0
-
None
-
2a5f0854efdf27ce70ffe569e97d3bcbfcc8e1c8 (pyside/pyside-setup/dev)
Description
The QObject.tr() function takes str parameters but the stubs defines it as bytes. This leads to mypy error: Argument 1 to "tr" of "QObject" has incompatible type "str"; expected "bytes"
According to the documentation, the function should indeed takes str, even though the C++ tr() function takes const char*.
Attachments
Issue Links
- relates to
-
PYSIDE-1467 QCoreApplication.instance() should hint return as optional
- Closed
-
PYSIDE-1955 mypy error: "QObject" has no attribute "tr"
- Closed
-
PYSIDE-2357 PySide6: QCoreApplication.translate() expects bytes according to type stubs
- Closed