From d006ecce7e79ff956ffcf07f646485123fac1078 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 22 Dec 2023 12:05:18 -0500 Subject: [PATCH] Fix `._pg_overrides` import cycle caused by our `Axis` override --- piker/ui/_pg_overrides.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/piker/ui/_pg_overrides.py b/piker/ui/_pg_overrides.py index bd35064b..a09a1241 100644 --- a/piker/ui/_pg_overrides.py +++ b/piker/ui/_pg_overrides.py @@ -24,8 +24,6 @@ view transforms. """ import pyqtgraph as pg -from ._axes import Axis - def invertQTransform(tr): """Return a QTransform that is the inverse of *tr*. @@ -53,6 +51,9 @@ def _do_overrides() -> None: pg.functions.invertQTransform = invertQTransform pg.PlotItem = PlotItem + from ._axes import Axis + pg.Axis = Axis + # enable "QPainterPathPrivate for faster arrayToQPath" from # https://github.com/pyqtgraph/pyqtgraph/pull/2324 pg.setConfigOption('enableExperimental', True) @@ -234,7 +235,7 @@ class PlotItem(pg.PlotItem): # ``ViewBox`` geometry bug.. where a gap for the # 'bottom' axis is somehow left in? # axis = pg.AxisItem(orientation=name, parent=self) - axis = Axis( + axis = pg.Axis( self, orientation=name, parent=self,