From 82daf0bb0779367f6e26d8859bd49622ff807477 Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Sun, 6 Oct 2024 21:04:31 -0400 Subject: [PATCH 1/2] fix auto canvas detection --- fastplotlib/__init__.py | 3 ++- fastplotlib/utils/__init__.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fastplotlib/__init__.py b/fastplotlib/__init__.py index a85de93c2..3cee71b28 100644 --- a/fastplotlib/__init__.py +++ b/fastplotlib/__init__.py @@ -1,6 +1,7 @@ from pathlib import Path -from .utils.gui import run # noqa +# this must be the first import for auto-canvas detection +from .utils import run # noqa from .graphics import * from .graphics.selectors import * from .graphics.utils import pause_events diff --git a/fastplotlib/utils/__init__.py b/fastplotlib/utils/__init__.py index 3ae83fb6b..7bd5bf351 100644 --- a/fastplotlib/utils/__init__.py +++ b/fastplotlib/utils/__init__.py @@ -1,6 +1,6 @@ from dataclasses import dataclass - +from .gui import run # this MUST be imported as early as possible in fpl.__init__ before any other wgpu stuff from .functions import * from .gpu import enumerate_adapters, select_adapter, print_wgpu_report from ._plot_helpers import * From 872b8b0ff44b1d966ae7ccc4d456618252aa585f Mon Sep 17 00:00:00 2001 From: kushalkolar Date: Sun, 6 Oct 2024 21:06:53 -0400 Subject: [PATCH 2/2] black --- fastplotlib/utils/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fastplotlib/utils/__init__.py b/fastplotlib/utils/__init__.py index 7bd5bf351..276397e88 100644 --- a/fastplotlib/utils/__init__.py +++ b/fastplotlib/utils/__init__.py @@ -1,6 +1,7 @@ from dataclasses import dataclass -from .gui import run # this MUST be imported as early as possible in fpl.__init__ before any other wgpu stuff +# this MUST be imported as early as possible in fpl.__init__ before any other wgpu stuff +from .gui import run from .functions import * from .gpu import enumerate_adapters, select_adapter, print_wgpu_report from ._plot_helpers import *