From e0462f0a8c8cff2341923e50e14f13d85b441501 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 8 Feb 2022 15:57:32 -0500 Subject: [PATCH] Type and formatting fixes --- piker/ui/_interaction.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/piker/ui/_interaction.py b/piker/ui/_interaction.py index 2b8448ca..ce56b7b6 100644 --- a/piker/ui/_interaction.py +++ b/piker/ui/_interaction.py @@ -342,7 +342,7 @@ class ChartView(ViewBox): wheelEventRelay = QtCore.Signal(object, object, object) event_relay_source: 'Optional[ViewBox]' = None - relays: dict[str, Signal] = {} + relays: dict[str, QtCore.Signal] = {} def __init__( self, @@ -474,7 +474,11 @@ class ChartView(ViewBox): # lastPos = ev.lastPos() # dif = pos - lastPos # dif = dif * -1 - center = Point(fn.invertQTransform(self.childGroup.transform()).map(ev.pos())) + center = Point( + fn.invertQTransform( + self.childGroup.transform() + ).map(ev.pos()) + ) # scale_y = 1.3 ** (center.y() * -1 / 20) self.scaleBy(s, center) @@ -674,7 +678,7 @@ class ChartView(ViewBox): # flag to prevent triggering sibling charts from the same linked # set from recursion errors. autoscale_linked_plots: bool = True, - autoscale_overlays: bool = False, + # autoscale_overlays: bool = False, ) -> None: ''' @@ -731,7 +735,7 @@ class ChartView(ViewBox): ) if set_range: - yrange = self._maxmin() + yrange = self._maxmin() if yrange is None: return