style: declare HoverableButton state attribute for the pyright gate
The dynamic _beamline_state assignment was a pre-existing pattern, but the panel rewrite turned its line into a changed line, so the basedpyright diff gate now counts it. Declare the attribute instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,8 +63,11 @@ class HoverableButton(QPushButton):
|
||||
hovered = Signal(object)
|
||||
unhovered = Signal()
|
||||
|
||||
# Set by the panel right after construction; carried in hover signals.
|
||||
_beamline_state: BeamlineStateEnum | None = None
|
||||
|
||||
def enterEvent(self, event) -> None:
|
||||
self.hovered.emit(getattr(self, "_beamline_state", None))
|
||||
self.hovered.emit(self._beamline_state)
|
||||
super().enterEvent(event)
|
||||
|
||||
def leaveEvent(self, event) -> None:
|
||||
|
||||
Reference in New Issue
Block a user