Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
6.5.0
-
None
-
-
9b791c5d8 (dev), 0513274b5 (6.5)
Description
mypy (1.2.0) fails while checking PySide's types with
> mypy . .venv/lib/python3.11/site-packages/PySide6/QtDBus.pyi:95: error: unexpected indent [syntax] Found 1 error in 1 file (errors prevented further checking)
I think the problem is the three dots (...) after the class declaration. AFAIK this is not allowed if class attributes are defined as well.
So instead of:
class QDBusAbstractInterfaceBase(PySide6.QtCore.QObject): ...
destroyed : ClassVar[Signal] = ... # destroyed()
objectNameChanged : ClassVar[Signal] = ... # objectNameChanged(QString)
it should be:
class QDBusAbstractInterfaceBase(PySide6.QtCore.QObject):
destroyed : ClassVar[Signal] = ... # destroyed()
objectNameChanged : ClassVar[Signal] = ... # objectNameChanged(QString)
Unfortunately, this bug prevents mypy from checking any other code as well. Only excluding my own modules that use QtDbus is somewhat of a workaround.