style: narrow the manual-resize press state for the pyright gate
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / test (3.13) (pull_request) Successful in 1m1s
CI / test (3.12) (pull_request) Successful in 1m6s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m6s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m11s
CI / test (3.11) (pull_request) Successful in 1m27s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m26s
CI / test-with-coverage (pull_request) Successful in 1m39s
CI / coverage-analysis (pull_request) Failing after 4s
CI / lint (pull_request) Successful in 3m2s

The diff-vs-main basedpyright gate flags QRect(self._press_geom) because
only _press_global was narrowed; both are set together in
mousePressEvent, so the extra check is a no-op at runtime.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-10 10:23:52 +02:00
co-authored by Claude Fable 5
parent 8fed60e73b
commit 52b812bada
+3 -1
View File
@@ -196,7 +196,9 @@ class PopoutWindow(QWidget):
super().mousePressEvent(event)
def mouseMoveEvent(self, event):
if self._manual_edges and self._press_global is not None:
# Both press fields are set together in mousePressEvent; the second
# check exists for the pyright gate, which can't see that pairing.
if self._manual_edges and self._press_global is not None and self._press_geom is not None:
delta = event.globalPosition().toPoint() - self._press_global
geom = QRect(self._press_geom)
if self._manual_edges & Qt.Edge.LeftEdge: