Details
-
Bug
-
Resolution: Fixed
-
P4: Low
-
6.5.0
-
None
-
08cde5ce3 (dev), f91bcb614 (6.5)
Description
The typing for Slot's result, as defined in QtCore.pyi, is set to Optional[str]:
class Slot(object): def __init__(self, *types: type, name: Optional[str] = ..., result: Optional[str] = ...) -> None: ... def __call__(self, function: Callable) -> Any: ...
However that should be a type (as also specified in the actual documentation): https://doc.qt.io/qtforpython-6/PySide6/QtCore/Slot.html
mypy also complains about setting the result as a type, even though a type is the correct value:
...py:100: error: Argument 1 to "addLayout" of "LayoutsMenu" has incompatible type "object"; expected "str" [arg-type]