fix: suppress takeAt override complaint from newer basedpyright stubs
CI / lint (pull_request) Successful in 55s
CI / test (3.12) (pull_request) Successful in 1m3s
CI / test (3.13) (pull_request) Successful in 1m5s
CI / test (3.14) (pull_request) Successful in 1m5s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m14s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m22s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m25s
CI / test-with-coverage (pull_request) Successful in 1m34s
CI / coverage-analysis (pull_request) Successful in 3s
Docs build and publish / docker (push) Successful in 6s
CI / lint (push) Canceled after 49s
CI / test (3.12) (push) Canceled after 46s
CI / test (3.13) (push) Canceled after 44s
CI / test (3.14) (push) Canceled after 41s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 39s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 36s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 34s
CI / test-with-coverage (push) Canceled after 31s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 29s

Qt's takeAt contract is nullptr-if-out-of-range; the newer PySide
stubs on CI declare a non-Optional return. Suppress rather than lie.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit was merged in pull request #231.
This commit is contained in:
2026-09-16 14:40:49 +02:00
co-authored by Claude Fable 5
parent 5cb57f4737
commit 145b94b7ef
+3 -1
View File
@@ -24,7 +24,9 @@ class FlowLayout(QLayout):
def itemAt(self, index):
return self._items[index] if 0 <= index < len(self._items) else None
def takeAt(self, index):
# Newer PySide stubs declare a non-Optional return, but Qt's own takeAt
# contract is "nullptr if out of range" — suppress, don't lie.
def takeAt(self, index): # pyright: ignore[reportIncompatibleMethodOverride]
return self._items.pop(index) if 0 <= index < len(self._items) else None
def expandingDirections(self):