-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.9.2
-
None
-
-
dabfd4317 (6.10), cab65daa7 (tqtc/lts-6.8), 212bfa6d8 (dev)
QLayoutItem.spacerItem and QLayoutItem.widget can return None but this is not reflected in the type hints.
Current (incorrect) type hints
def spacerItem(self, /) -> PySide6.QtWidgets.QSpacerItem: ... def widget(self, /) -> PySide6.QtWidgets.QWidget: ...
Correct type hints
def spacerItem(self, /) -> PySide6.QtWidgets.QSpacerItem | None: ... def widget(self, /) -> PySide6.QtWidgets.QWidget | None: ...
For Gerrit Dashboard: PYSIDE-3188 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
677962,2 | pyi: QLayoutItem add Optional for spacerItem and widget return | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
678246,2 | pyi: QLayoutItem add Optional for spacerItem and widget return | 6.10 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
678313,2 | pyi: QLayoutItem add Optional for spacerItem and widget return | tqtc/lts-6.8 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | 0 |