Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
6.7.0
-
None
-
8a416e88c (dev), c0edf645f (6.8)
Description
There are multiple issues with overlapping or incompatible overload signatures in the stub files.
There are broadly 3 categories of this issue.
1. Conflicting overloads
Different return types with overlapping argument types. For example:
class QWidget(PySide6.QtCore.QObject, PySide6.QtGui.QPaintDevice): @overload def mapTo(self, arg__1: PySide6.QtWidgets.QWidget, arg__2: PySide6.QtCore.QPoint) -> PySide6.QtCore.QPoint: ... @overload def mapTo(self, arg__1: PySide6.QtWidgets.QWidget, arg__2: Union[PySide6.QtCore.QPointF, PySide6.QtCore.QPoint, PySide6.QtGui.QPainterPath.Element]) -> PySide6.QtCore.QPointF: ...
2. Compatible overlapping overloads
One of the overloads is unneccessary because it is already covered by the other.
class QCborStreamReader(Shiboken.Object): @overload def addData(self, data: Union[bytes, bytearray, memoryview], len: int) -> None: ... @overload def addData(self, data: bytearray, len: int) -> None: ...
3. Duplicate identical overloads
class QByteArray(Shiboken.Object): @overload @staticmethod def number(arg__1: int, base: int = ...) -> PySide6.QtCore.QByteArray: ... @overload @staticmethod def number(arg__1: int, base: int = ...) -> PySide6.QtCore.QByteArray: ...
I came across those issues in QtCore.pyi and QtWidgets.pyi but I'm sure other stubs are affected too.
Depending on the strictness of the type checker, there are also other overload and override issues.