diff --git a/examples/add_centroids.py b/examples/add_centroids.py index 4b9a2d5..6cd3307 100644 --- a/examples/add_centroids.py +++ b/examples/add_centroids.py @@ -1,4 +1,5 @@ """Example showing how to plot centroids.""" + import napari_plot import numpy as np diff --git a/examples/add_few_large_lines.py b/examples/add_few_large_lines.py index f8efd6c..eaf6a19 100644 --- a/examples/add_few_large_lines.py +++ b/examples/add_few_large_lines.py @@ -1,4 +1,5 @@ """Example showing how to plot multiple line sand adjust axis labels.""" + import napari_plot import numpy as np diff --git a/examples/add_image.py b/examples/add_image.py index da891b5..f441343 100644 --- a/examples/add_image.py +++ b/examples/add_image.py @@ -3,6 +3,7 @@ The MultiLine layer is implemented to enable better performance when plotting multiple lines of long length. In the example below we are plotting several long lines with no noticeable performance drop. """ + import napari_plot import numpy as np diff --git a/examples/add_line_with_apex.py b/examples/add_line_with_apex.py index 3f71fcd..29b1b00 100644 --- a/examples/add_line_with_apex.py +++ b/examples/add_line_with_apex.py @@ -1,4 +1,5 @@ """Example showing simple line and 'infinite' line to show the apex""" + import napari_plot import numpy as np diff --git a/examples/add_lines_and_span.py b/examples/add_lines_and_span.py index c660707..469ee47 100644 --- a/examples/add_lines_and_span.py +++ b/examples/add_lines_and_span.py @@ -1,4 +1,5 @@ """Example showing how to plot multiple line sand adjust axis labels.""" + import napari_plot import numpy as np diff --git a/examples/add_multiline.py b/examples/add_multiline.py index e934537..4aa09ef 100644 --- a/examples/add_multiline.py +++ b/examples/add_multiline.py @@ -3,6 +3,7 @@ The MultiLine layer is implemented to enable better performance when plotting multiple lines of long length. In the example below we are plotting several long lines with no noticeable performance drop. """ + import napari_plot import numpy as np diff --git a/examples/add_multiline_with_different_size.py b/examples/add_multiline_with_different_size.py index 91c84e4..4468f4b 100644 --- a/examples/add_multiline_with_different_size.py +++ b/examples/add_multiline_with_different_size.py @@ -3,6 +3,7 @@ The MultiLine layer accepts data of different sizes. You can provide dict of `xs` and `ys` of arbitrary lengths as long as the number of lines arrays is the same and the corresponding arrays have identical size. """ + import napari_plot import numpy as np diff --git a/examples/add_multiple_infinite_lines.py b/examples/add_multiple_infinite_lines.py index 7dafff4..bd3bc05 100644 --- a/examples/add_multiple_infinite_lines.py +++ b/examples/add_multiple_infinite_lines.py @@ -1,4 +1,5 @@ """Multiple infinite lines in a single layer.""" + import napari_plot import numpy as np diff --git a/examples/add_multiple_regions.py b/examples/add_multiple_regions.py index b667c5b..6d68b83 100644 --- a/examples/add_multiple_regions.py +++ b/examples/add_multiple_regions.py @@ -1,4 +1,5 @@ """Multiple infinite regions in a single layer.""" + import napari_plot import numpy as np diff --git a/examples/add_scatter.py b/examples/add_scatter.py index b57c9fe..013d389 100644 --- a/examples/add_scatter.py +++ b/examples/add_scatter.py @@ -3,6 +3,7 @@ The MultiLine layer is implemented to enable better performance when plotting multiple lines of long length. In the example below we are plotting several long lines with no noticeable performance drop. """ + import napari_plot import numpy as np diff --git a/examples/add_simple_lines.py b/examples/add_simple_lines.py index 3c0d602..2820f99 100644 --- a/examples/add_simple_lines.py +++ b/examples/add_simple_lines.py @@ -1,4 +1,5 @@ """Example showing how to plot multiple line sand adjust axis labels.""" + import napari_plot import numpy as np diff --git a/examples/change_tick_formatter.py b/examples/change_tick_formatter.py index cecaf6f..7f2fdec 100644 --- a/examples/change_tick_formatter.py +++ b/examples/change_tick_formatter.py @@ -1,4 +1,5 @@ """Custom formatter.""" + import napari_plot import numpy as np diff --git a/examples/live_update_lines.py b/examples/live_update_lines.py index 6e4550a..877147e 100644 --- a/examples/live_update_lines.py +++ b/examples/live_update_lines.py @@ -1,4 +1,5 @@ """Example shows a sine wave `moving` over time..""" + import time import napari_plot import numpy as np diff --git a/examples/live_update_multiple_lines.py b/examples/live_update_multiple_lines.py index 43d46b1..e1351ec 100644 --- a/examples/live_update_multiple_lines.py +++ b/examples/live_update_multiple_lines.py @@ -5,6 +5,7 @@ This method does not do many checks so you must make sure that whatever data you replace, it has the same characteristics as the original or at least it's valid. """ + import napari_plot import numpy as np from napari.qt import thread_worker diff --git a/examples/live_update_scatter.py b/examples/live_update_scatter.py index 8392bad..476ad11 100644 --- a/examples/live_update_scatter.py +++ b/examples/live_update_scatter.py @@ -1,4 +1,5 @@ """Example shows a sin and cos scatter points moving over time.""" + import time import napari_plot import numpy as np diff --git a/examples/show_layer_types.py b/examples/show_layer_types.py index c526ff5..f1e91ca 100644 --- a/examples/show_layer_types.py +++ b/examples/show_layer_types.py @@ -1,4 +1,5 @@ """Display image and 1d plot.""" + import numpy as np import napari_plot diff --git a/examples_with_napari/napari-and-1d-canvas.py b/examples_with_napari/napari-and-1d-canvas.py index 25b0ae5..1d3569e 100644 --- a/examples_with_napari/napari-and-1d-canvas.py +++ b/examples_with_napari/napari-and-1d-canvas.py @@ -1,4 +1,5 @@ """Display image and 1d plot.""" + import napari import numpy as np from skimage import data diff --git a/examples_with_napari/napari-and-1d-live-callback.py b/examples_with_napari/napari-and-1d-live-callback.py index ed52157..e5e62e9 100644 --- a/examples_with_napari/napari-and-1d-live-callback.py +++ b/examples_with_napari/napari-and-1d-live-callback.py @@ -1,4 +1,5 @@ """Create simple callback that modifies the line visual.""" + import napari import numpy as np from skimage import data, measure diff --git a/napari_plot/__init__.py b/napari_plot/__init__.py index 92ce6e7..bca897b 100644 --- a/napari_plot/__init__.py +++ b/napari_plot/__init__.py @@ -1,4 +1,5 @@ """Init""" + try: from napari_plot._version import version as __version__ except ImportError: diff --git a/napari_plot/__main__.py b/napari_plot/__main__.py index 3fd2f33..2687726 100644 --- a/napari_plot/__main__.py +++ b/napari_plot/__main__.py @@ -1,4 +1,5 @@ """napari-plot command line viewer.""" + import argparse import logging import os diff --git a/napari_plot/_contribution.py b/napari_plot/_contribution.py index 0a02bb4..17b61b8 100644 --- a/napari_plot/_contribution.py +++ b/napari_plot/_contribution.py @@ -1,4 +1,5 @@ """Napari contributions in old npe1 style.""" + from napari_plugin_engine import napari_hook_implementation from napari_plot._plot_widget import NapariPlotWidget diff --git a/napari_plot/_plot_widget.py b/napari_plot/_plot_widget.py index e8e985b..b25c29b 100644 --- a/napari_plot/_plot_widget.py +++ b/napari_plot/_plot_widget.py @@ -1,4 +1,5 @@ """Dock widget""" + from qtpy.QtWidgets import QVBoxLayout, QWidget from napari_plot._qt.helpers import get_parent diff --git a/napari_plot/_qt/_tests/test_icon_button.py b/napari_plot/_qt/_tests/test_icon_button.py index 9324d9e..ca9b345 100644 --- a/napari_plot/_qt/_tests/test_icon_button.py +++ b/napari_plot/_qt/_tests/test_icon_button.py @@ -1,4 +1,5 @@ """Test image buttons.""" + import pytest from napari.layers import Points from napari.layers.points._points_constants import Mode diff --git a/napari_plot/_qt/_tests/test_icon_label.py b/napari_plot/_qt/_tests/test_icon_label.py index 0851e62..fa899af 100644 --- a/napari_plot/_qt/_tests/test_icon_label.py +++ b/napari_plot/_qt/_tests/test_icon_label.py @@ -1,4 +1,5 @@ """Test image labels.""" + import pytest from napari_plot._qt.widgets.qt_icon_label import SIZES, QtQtaLabel diff --git a/napari_plot/_qt/_tests/test_qt_viewer.py b/napari_plot/_qt/_tests/test_qt_viewer.py index 120dea0..9e53c50 100644 --- a/napari_plot/_qt/_tests/test_qt_viewer.py +++ b/napari_plot/_qt/_tests/test_qt_viewer.py @@ -1,4 +1,5 @@ """Check QtViewer""" + import numpy as np import pytest diff --git a/napari_plot/_qt/component_controls/qt_axis_controls.py b/napari_plot/_qt/component_controls/qt_axis_controls.py index 28b5bd1..aa06d01 100644 --- a/napari_plot/_qt/component_controls/qt_axis_controls.py +++ b/napari_plot/_qt/component_controls/qt_axis_controls.py @@ -1,4 +1,5 @@ """X/Y-axis controls""" + from typing import TYPE_CHECKING from napari._qt.utils import disable_with_opacity, qt_signals_blocked diff --git a/napari_plot/_qt/component_controls/qt_camera_controls.py b/napari_plot/_qt/component_controls/qt_camera_controls.py index 6266a5c..c6c1c3b 100644 --- a/napari_plot/_qt/component_controls/qt_camera_controls.py +++ b/napari_plot/_qt/component_controls/qt_camera_controls.py @@ -1,4 +1,5 @@ """Camera controls""" + import typing as ty from napari.utils.events import disconnect_events diff --git a/napari_plot/_qt/helpers.py b/napari_plot/_qt/helpers.py index aa3f962..6b17d58 100644 --- a/napari_plot/_qt/helpers.py +++ b/napari_plot/_qt/helpers.py @@ -1,4 +1,5 @@ """Helper functions to easily create UI elements.""" + import typing as ty from contextlib import contextmanager diff --git a/napari_plot/_qt/layer_controls/_tests/test_qt_infline_controls.py b/napari_plot/_qt/layer_controls/_tests/test_qt_infline_controls.py index 03ccc8a..a4327b1 100644 --- a/napari_plot/_qt/layer_controls/_tests/test_qt_infline_controls.py +++ b/napari_plot/_qt/layer_controls/_tests/test_qt_infline_controls.py @@ -1,4 +1,5 @@ """Test controls""" + import numpy as np import pytest from napari.utils.colormaps.standardize_color import transform_color diff --git a/napari_plot/_qt/layer_controls/_tests/test_qt_line_controls.py b/napari_plot/_qt/layer_controls/_tests/test_qt_line_controls.py index 7e276e2..0c52183 100644 --- a/napari_plot/_qt/layer_controls/_tests/test_qt_line_controls.py +++ b/napari_plot/_qt/layer_controls/_tests/test_qt_line_controls.py @@ -1,4 +1,5 @@ """Test controls""" + import numpy as np import pytest from napari.utils.colormaps.standardize_color import transform_color diff --git a/napari_plot/_qt/layer_controls/_tests/test_qt_multiline_controls.py b/napari_plot/_qt/layer_controls/_tests/test_qt_multiline_controls.py index 31a7b78..b5079c1 100644 --- a/napari_plot/_qt/layer_controls/_tests/test_qt_multiline_controls.py +++ b/napari_plot/_qt/layer_controls/_tests/test_qt_multiline_controls.py @@ -1,4 +1,5 @@ """Test controls""" + import numpy as np import pytest from napari.utils.colormaps.standardize_color import transform_color diff --git a/napari_plot/_qt/layer_controls/_tests/test_qt_region_controls.py b/napari_plot/_qt/layer_controls/_tests/test_qt_region_controls.py index b060a85..4c437cb 100644 --- a/napari_plot/_qt/layer_controls/_tests/test_qt_region_controls.py +++ b/napari_plot/_qt/layer_controls/_tests/test_qt_region_controls.py @@ -1,4 +1,5 @@ """Test controls""" + import numpy as np import pytest from napari.utils.colormaps.standardize_color import transform_color diff --git a/napari_plot/_qt/layer_controls/_tests/test_qt_scatter_controls.py b/napari_plot/_qt/layer_controls/_tests/test_qt_scatter_controls.py index 046ce8f..1efb866 100644 --- a/napari_plot/_qt/layer_controls/_tests/test_qt_scatter_controls.py +++ b/napari_plot/_qt/layer_controls/_tests/test_qt_scatter_controls.py @@ -1,4 +1,5 @@ """Test controls""" + import numpy as np import pytest from napari.utils.colormaps.standardize_color import transform_color diff --git a/napari_plot/_qt/layer_controls/qt_centroids_controls.py b/napari_plot/_qt/layer_controls/qt_centroids_controls.py index 459e4fd..4057866 100644 --- a/napari_plot/_qt/layer_controls/qt_centroids_controls.py +++ b/napari_plot/_qt/layer_controls/qt_centroids_controls.py @@ -1,4 +1,5 @@ """Centroids controls""" + import typing as ty from napari._qt.utils import disable_with_opacity, qt_signals_blocked diff --git a/napari_plot/_qt/layer_controls/qt_infline_controls.py b/napari_plot/_qt/layer_controls/qt_infline_controls.py index fdcd9c7..a1bf758 100644 --- a/napari_plot/_qt/layer_controls/qt_infline_controls.py +++ b/napari_plot/_qt/layer_controls/qt_infline_controls.py @@ -1,4 +1,5 @@ """Line controls""" + import typing as ty from napari._qt.utils import disable_with_opacity, qt_signals_blocked diff --git a/napari_plot/_qt/layer_controls/qt_layer_controls_base.py b/napari_plot/_qt/layer_controls/qt_layer_controls_base.py index c8fbe2a..e4bad71 100644 --- a/napari_plot/_qt/layer_controls/qt_layer_controls_base.py +++ b/napari_plot/_qt/layer_controls/qt_layer_controls_base.py @@ -1,4 +1,5 @@ """Base layer controls""" + from napari.layers.base._base_constants import BLENDING_TRANSLATIONS from napari.utils.events import disconnect_events from qtpy.QtCore import Qt diff --git a/napari_plot/_qt/layer_controls/qt_layer_controls_container.py b/napari_plot/_qt/layer_controls/qt_layer_controls_container.py index f19cc47..069b03d 100644 --- a/napari_plot/_qt/layer_controls/qt_layer_controls_container.py +++ b/napari_plot/_qt/layer_controls/qt_layer_controls_container.py @@ -1,4 +1,5 @@ """Layer controls.""" + import napari._qt.layer_controls.qt_layer_controls_container from napari._qt.layer_controls.qt_layer_controls_container import QtLayerControlsContainer # noqa diff --git a/napari_plot/_qt/layer_controls/qt_layers_dialog.py b/napari_plot/_qt/layer_controls/qt_layers_dialog.py index 899584e..df77b08 100644 --- a/napari_plot/_qt/layer_controls/qt_layers_dialog.py +++ b/napari_plot/_qt/layer_controls/qt_layers_dialog.py @@ -1,4 +1,5 @@ """Tool dialog to display layer controls""" + from weakref import ref from qtpy.QtWidgets import QVBoxLayout diff --git a/napari_plot/_qt/layer_controls/qt_line_controls.py b/napari_plot/_qt/layer_controls/qt_line_controls.py index 97cb421..b187c1e 100644 --- a/napari_plot/_qt/layer_controls/qt_line_controls.py +++ b/napari_plot/_qt/layer_controls/qt_line_controls.py @@ -1,4 +1,5 @@ """Line controls""" + import typing as ty from napari._qt.utils import disable_with_opacity, qt_signals_blocked diff --git a/napari_plot/_qt/layer_controls/qt_multiline_controls.py b/napari_plot/_qt/layer_controls/qt_multiline_controls.py index 52b8c11..fc2da0e 100644 --- a/napari_plot/_qt/layer_controls/qt_multiline_controls.py +++ b/napari_plot/_qt/layer_controls/qt_multiline_controls.py @@ -1,4 +1,5 @@ """MultiLine controls""" + import typing as ty from napari._qt.utils import disable_with_opacity, qt_signals_blocked diff --git a/napari_plot/_qt/layer_controls/qt_region_controls.py b/napari_plot/_qt/layer_controls/qt_region_controls.py index c0f1f4f..b2cd57d 100644 --- a/napari_plot/_qt/layer_controls/qt_region_controls.py +++ b/napari_plot/_qt/layer_controls/qt_region_controls.py @@ -1,4 +1,5 @@ """Scatter layer controls""" + import typing as ty import numpy as np diff --git a/napari_plot/_qt/layer_controls/qt_scatter_controls.py b/napari_plot/_qt/layer_controls/qt_scatter_controls.py index 4b59052..be2e15e 100644 --- a/napari_plot/_qt/layer_controls/qt_scatter_controls.py +++ b/napari_plot/_qt/layer_controls/qt_scatter_controls.py @@ -1,4 +1,5 @@ """Scatter layer controls""" + import typing as ty import numpy as np @@ -70,17 +71,17 @@ def __init__(self, layer: "Scatter"): self.size_slider.valueChanged.connect(self.on_change_size) self.face_color_swatch = QColorSwatch( - initial_color=self.layer.face_color[-1] - if self.layer.face_color.size > 0 - else self.layer._default_face_color, + initial_color=( + self.layer.face_color[-1] if self.layer.face_color.size > 0 else self.layer._default_face_color + ), tooltip="Click to set face color", ) self.face_color_swatch.color_changed.connect(self.on_change_face_color) # noqa self.edge_color_swatch = QColorSwatch( - initial_color=self.layer.edge_color[-1] - if self.layer.edge_color.size > 0 - else self.layer._default_edge_color, + initial_color=( + self.layer.edge_color[-1] if self.layer.edge_color.size > 0 else self.layer._default_edge_color + ), tooltip="Click to set edge color", ) self.edge_color_swatch.color_changed.connect(self.on_change_edge_color) # noqa diff --git a/napari_plot/_qt/qt_event_loop.py b/napari_plot/_qt/qt_event_loop.py index 37bcdfa..681f0c5 100644 --- a/napari_plot/_qt/qt_event_loop.py +++ b/napari_plot/_qt/qt_event_loop.py @@ -1,4 +1,5 @@ """Event loop""" + import os import sys from warnings import warn diff --git a/napari_plot/_qt/qt_layer_buttons.py b/napari_plot/_qt/qt_layer_buttons.py index 161a5c7..b02780f 100644 --- a/napari_plot/_qt/qt_layer_buttons.py +++ b/napari_plot/_qt/qt_layer_buttons.py @@ -1,4 +1,5 @@ """Layer buttons""" + from napari._qt.widgets.qt_viewer_buttons import QtDeleteButton from qtpy.QtWidgets import QFrame, QHBoxLayout diff --git a/napari_plot/_qt/qt_main_window.py b/napari_plot/_qt/qt_main_window.py index 4a3c8d6..b8f8821 100644 --- a/napari_plot/_qt/qt_main_window.py +++ b/napari_plot/_qt/qt_main_window.py @@ -1,4 +1,5 @@ """Native window.""" + import time import typing as ty from functools import partial diff --git a/napari_plot/_qt/qt_toolbar.py b/napari_plot/_qt/qt_toolbar.py index a7dc2f6..35a8d88 100644 --- a/napari_plot/_qt/qt_toolbar.py +++ b/napari_plot/_qt/qt_toolbar.py @@ -1,4 +1,5 @@ """Toolbar""" + from weakref import ref from qtpy.QtCore import Qt diff --git a/napari_plot/_qt/qt_viewer.py b/napari_plot/_qt/qt_viewer.py index bb0ec88..99ea70a 100644 --- a/napari_plot/_qt/qt_viewer.py +++ b/napari_plot/_qt/qt_viewer.py @@ -1,4 +1,5 @@ """Qt widget that embeds the canvas""" + import warnings from contextlib import suppress from weakref import WeakSet diff --git a/napari_plot/_qt/widgets/qt_dev.py b/napari_plot/_qt/widgets/qt_dev.py index b7895d1..4403590 100644 --- a/napari_plot/_qt/widgets/qt_dev.py +++ b/napari_plot/_qt/widgets/qt_dev.py @@ -1,4 +1,5 @@ """Development widgets.""" + import importlib import pkgutil from pathlib import Path diff --git a/napari_plot/_qt/widgets/qt_icon_button.py b/napari_plot/_qt/widgets/qt_icon_button.py index df02c21..2b6f618 100644 --- a/napari_plot/_qt/widgets/qt_icon_button.py +++ b/napari_plot/_qt/widgets/qt_icon_button.py @@ -1,4 +1,5 @@ """QtImagePushButton""" + import typing as ty import qtawesome diff --git a/napari_plot/_qt/widgets/qt_icon_label.py b/napari_plot/_qt/widgets/qt_icon_label.py index c800758..5ff2ef4 100644 --- a/napari_plot/_qt/widgets/qt_icon_label.py +++ b/napari_plot/_qt/widgets/qt_icon_label.py @@ -1,4 +1,5 @@ """QtIconLabel""" + import qtawesome from napari.settings import get_settings from napari.utils.events.event_utils import connect_no_arg diff --git a/napari_plot/_qt/widgets/qt_line.py b/napari_plot/_qt/widgets/qt_line.py index c0219d7..efce115 100644 --- a/napari_plot/_qt/widgets/qt_line.py +++ b/napari_plot/_qt/widgets/qt_line.py @@ -1,4 +1,5 @@ """Horizontal and Vertical lines""" + from qtpy.QtWidgets import QFrame diff --git a/napari_plot/_qt/widgets/qt_mini_toolbar.py b/napari_plot/_qt/widgets/qt_mini_toolbar.py index 09dbca1..201208a 100644 --- a/napari_plot/_qt/widgets/qt_mini_toolbar.py +++ b/napari_plot/_qt/widgets/qt_mini_toolbar.py @@ -1,4 +1,5 @@ """Mini toolbar""" + import typing as ty from qtpy.QtCore import Qt diff --git a/napari_plot/_scatter_widget.py b/napari_plot/_scatter_widget.py index 58c3725..cdb1fd1 100644 --- a/napari_plot/_scatter_widget.py +++ b/napari_plot/_scatter_widget.py @@ -2,6 +2,7 @@ This widget is inspired by ScatterWidget in https://github.com/dstansby/napari-matplotlib """ + import typing as ty from contextlib import suppress from warnings import warn diff --git a/napari_plot/_tests/test_scatter_widget.py b/napari_plot/_tests/test_scatter_widget.py index ad1877b..25cf617 100644 --- a/napari_plot/_tests/test_scatter_widget.py +++ b/napari_plot/_tests/test_scatter_widget.py @@ -1,4 +1,5 @@ """Test ScatterPlotWidget""" + import numpy as np import pytest diff --git a/napari_plot/_tests/utils.py b/napari_plot/_tests/utils.py index d0ab8a5..244cae3 100644 --- a/napari_plot/_tests/utils.py +++ b/napari_plot/_tests/utils.py @@ -1,4 +1,5 @@ """Utilities for tests.""" + import os import sys diff --git a/napari_plot/_vispy/__init__.py b/napari_plot/_vispy/__init__.py index 1ddb759..1a70309 100644 --- a/napari_plot/_vispy/__init__.py +++ b/napari_plot/_vispy/__init__.py @@ -1,3 +1,4 @@ """Init""" + # this import is needed to overwrite the default behaviour of ticker from napari_plot._vispy.components import axis # noqa: F401 diff --git a/napari_plot/_vispy/camera.py b/napari_plot/_vispy/camera.py index bbde74f..65fab89 100644 --- a/napari_plot/_vispy/camera.py +++ b/napari_plot/_vispy/camera.py @@ -1,4 +1,5 @@ """Camera model""" + import typing as ty import numpy as np diff --git a/napari_plot/_vispy/canvas.py b/napari_plot/_vispy/canvas.py index 58cab07..6bca379 100644 --- a/napari_plot/_vispy/canvas.py +++ b/napari_plot/_vispy/canvas.py @@ -1,4 +1,5 @@ """Line-specific vispy canvas""" + from contextlib import contextmanager from napari._vispy.utils.gl import get_max_texture_sizes diff --git a/napari_plot/_vispy/components/axis.py b/napari_plot/_vispy/components/axis.py index 3383c47..1a09b88 100644 --- a/napari_plot/_vispy/components/axis.py +++ b/napari_plot/_vispy/components/axis.py @@ -1,4 +1,5 @@ """Reimplementation of axis-visual""" + import numpy as np import vispy.visuals.axis from vispy.visuals.axis import Ticker as _Ticker diff --git a/napari_plot/_vispy/components/camera.py b/napari_plot/_vispy/components/camera.py index 9670473..d1b1a6d 100644 --- a/napari_plot/_vispy/components/camera.py +++ b/napari_plot/_vispy/components/camera.py @@ -1,4 +1,5 @@ """Specialized camera for 1d data""" + import typing as ty import numpy as np diff --git a/napari_plot/_vispy/layers/centroids.py b/napari_plot/_vispy/layers/centroids.py index cf6381b..a6e9e62 100644 --- a/napari_plot/_vispy/layers/centroids.py +++ b/napari_plot/_vispy/layers/centroids.py @@ -1,4 +1,5 @@ """Centroids layer""" + import typing as ty from napari._vispy.layers.base import VispyBaseLayer diff --git a/napari_plot/_vispy/layers/infline.py b/napari_plot/_vispy/layers/infline.py index cb17a57..410ddef 100644 --- a/napari_plot/_vispy/layers/infline.py +++ b/napari_plot/_vispy/layers/infline.py @@ -1,4 +1,5 @@ """Line layer""" + import typing as ty import numpy as np diff --git a/napari_plot/_vispy/layers/line.py b/napari_plot/_vispy/layers/line.py index ad4479e..5fb557e 100644 --- a/napari_plot/_vispy/layers/line.py +++ b/napari_plot/_vispy/layers/line.py @@ -1,4 +1,5 @@ """Line layer""" + import typing as ty from napari._vispy.layers.base import VispyBaseLayer diff --git a/napari_plot/_vispy/layers/multiline.py b/napari_plot/_vispy/layers/multiline.py index 048575b..13bef23 100644 --- a/napari_plot/_vispy/layers/multiline.py +++ b/napari_plot/_vispy/layers/multiline.py @@ -1,4 +1,5 @@ """Vispy visual for MultiLine Layer type.""" + import typing as ty from napari._vispy.layers.base import VispyBaseLayer diff --git a/napari_plot/_vispy/layers/region.py b/napari_plot/_vispy/layers/region.py index 426a6a5..c5008c3 100644 --- a/napari_plot/_vispy/layers/region.py +++ b/napari_plot/_vispy/layers/region.py @@ -1,4 +1,5 @@ """Region layer""" + import typing as ty import numpy as np diff --git a/napari_plot/_vispy/layers/scatter.py b/napari_plot/_vispy/layers/scatter.py index 78e5f86..1052e49 100644 --- a/napari_plot/_vispy/layers/scatter.py +++ b/napari_plot/_vispy/layers/scatter.py @@ -1,4 +1,5 @@ """Scatter points layer""" + import typing as ty import numpy as np diff --git a/napari_plot/_vispy/overlays/axis.py b/napari_plot/_vispy/overlays/axis.py index 8a3136a..4e68660 100644 --- a/napari_plot/_vispy/overlays/axis.py +++ b/napari_plot/_vispy/overlays/axis.py @@ -1,4 +1,5 @@ """Axes visual""" + from vispy.scene import AxisWidget diff --git a/napari_plot/_vispy/overlays/grid_lines.py b/napari_plot/_vispy/overlays/grid_lines.py index 1fa72d1..63bb04f 100644 --- a/napari_plot/_vispy/overlays/grid_lines.py +++ b/napari_plot/_vispy/overlays/grid_lines.py @@ -1,4 +1,5 @@ """Grid lines visual""" + import typing as ty from vispy.scene.visuals import GridLines diff --git a/napari_plot/_vispy/overlays/text.py b/napari_plot/_vispy/overlays/text.py index 2204f99..2bda7fe 100644 --- a/napari_plot/_vispy/overlays/text.py +++ b/napari_plot/_vispy/overlays/text.py @@ -1,4 +1,5 @@ """Override text visual to fix label cropping""" + from weakref import ref from napari._vispy.overlays.text import TextOverlayPosition diff --git a/napari_plot/_vispy/tools/drag.py b/napari_plot/_vispy/tools/drag.py index e585248..17a45f1 100644 --- a/napari_plot/_vispy/tools/drag.py +++ b/napari_plot/_vispy/tools/drag.py @@ -1,4 +1,5 @@ """Interaction tool.""" + import typing as ty from napari_plot._vispy.tools.polygon import VispyPolygonVisual diff --git a/napari_plot/_vispy/tools/polygon.py b/napari_plot/_vispy/tools/polygon.py index 3f50d6d..390262e 100644 --- a/napari_plot/_vispy/tools/polygon.py +++ b/napari_plot/_vispy/tools/polygon.py @@ -1,4 +1,5 @@ """Span visual - based on the `Region` layer""" + import typing as ty import numpy as np diff --git a/napari_plot/_vispy/utils/axis.py b/napari_plot/_vispy/utils/axis.py index c00cddf..6813262 100644 --- a/napari_plot/_vispy/utils/axis.py +++ b/napari_plot/_vispy/utils/axis.py @@ -1,4 +1,5 @@ """Utils""" + import numpy as np diff --git a/napari_plot/_vispy/utils/visual.py b/napari_plot/_vispy/utils/visual.py index 0d881ea..8150370 100644 --- a/napari_plot/_vispy/utils/visual.py +++ b/napari_plot/_vispy/utils/visual.py @@ -1,4 +1,5 @@ """Utilities.""" + from napari._vispy.layers.base import VispyBaseLayer from napari._vispy.layers.image import VispyImageLayer from napari._vispy.layers.points import VispyPointsLayer diff --git a/napari_plot/_vispy/visuals/centroids.py b/napari_plot/_vispy/visuals/centroids.py index a0d0d7e..83cae07 100644 --- a/napari_plot/_vispy/visuals/centroids.py +++ b/napari_plot/_vispy/visuals/centroids.py @@ -1,2 +1,3 @@ """Scatter visual.""" + from vispy.scene.visuals import Line as CentroidsVisual # noqa: F401 diff --git a/napari_plot/_vispy/visuals/infline.py b/napari_plot/_vispy/visuals/infline.py index e78641c..2a81ccd 100644 --- a/napari_plot/_vispy/visuals/infline.py +++ b/napari_plot/_vispy/visuals/infline.py @@ -1,4 +1,5 @@ """Scatter visual.""" + from vispy.scene.visuals import Compound, Line diff --git a/napari_plot/_vispy/visuals/line.py b/napari_plot/_vispy/visuals/line.py index 8a3b11d..54f7b1b 100644 --- a/napari_plot/_vispy/visuals/line.py +++ b/napari_plot/_vispy/visuals/line.py @@ -1,2 +1,3 @@ """Scatter visual.""" + from vispy.scene.visuals import Line as LineVisual # noqa: F401 diff --git a/napari_plot/_vispy/visuals/multiline.py b/napari_plot/_vispy/visuals/multiline.py index eed24e9..88ac745 100644 --- a/napari_plot/_vispy/visuals/multiline.py +++ b/napari_plot/_vispy/visuals/multiline.py @@ -1,4 +1,5 @@ """Scatter visual.""" + from vispy.scene.visuals import Compound, Line diff --git a/napari_plot/_vispy/visuals/region.py b/napari_plot/_vispy/visuals/region.py index e4155a5..1124863 100644 --- a/napari_plot/_vispy/visuals/region.py +++ b/napari_plot/_vispy/visuals/region.py @@ -1,4 +1,5 @@ """Scatter visual.""" + from vispy.scene.visuals import Compound, Line, Mesh diff --git a/napari_plot/_vispy/visuals/scatter.py b/napari_plot/_vispy/visuals/scatter.py index 498bfb9..f8fcfc1 100644 --- a/napari_plot/_vispy/visuals/scatter.py +++ b/napari_plot/_vispy/visuals/scatter.py @@ -1,4 +1,5 @@ """Scatter visual.""" + from vispy.scene.visuals import Compound, Line, Markers, Text diff --git a/napari_plot/components/_tests/test_camera.py b/napari_plot/components/_tests/test_camera.py index a46a2d5..b2f541f 100644 --- a/napari_plot/components/_tests/test_camera.py +++ b/napari_plot/components/_tests/test_camera.py @@ -1,4 +1,5 @@ """Tests for components/camera""" + from napari_plot.components.camera import Camera diff --git a/napari_plot/components/_tests/test_viewer_model.py b/napari_plot/components/_tests/test_viewer_model.py index e6e3e82..fb86f7b 100644 --- a/napari_plot/components/_tests/test_viewer_model.py +++ b/napari_plot/components/_tests/test_viewer_model.py @@ -1,4 +1,5 @@ """Test ViewerModel""" + import numpy as np import pytest diff --git a/napari_plot/components/_viewer_key_bindings.py b/napari_plot/components/_viewer_key_bindings.py index d82b494..b3e24a6 100644 --- a/napari_plot/components/_viewer_key_bindings.py +++ b/napari_plot/components/_viewer_key_bindings.py @@ -1,4 +1,5 @@ """Keyboard shortcuts""" + from napari_plot.components.viewer_model import ViewerModel diff --git a/napari_plot/components/_viewer_mouse_bindings.py b/napari_plot/components/_viewer_mouse_bindings.py index ad11f9e..f35ea04 100644 --- a/napari_plot/components/_viewer_mouse_bindings.py +++ b/napari_plot/components/_viewer_mouse_bindings.py @@ -1,4 +1,5 @@ """Mouse bindings to the viewer""" + import typing as ty from functools import partial diff --git a/napari_plot/components/axis.py b/napari_plot/components/axis.py index 094804b..6b83ceb 100644 --- a/napari_plot/components/axis.py +++ b/napari_plot/components/axis.py @@ -1,4 +1,5 @@ """Axis model""" + import typing as ty from napari.utils.colormaps.standardize_color import transform_color diff --git a/napari_plot/components/camera.py b/napari_plot/components/camera.py index 8b0ed58..be5965b 100644 --- a/napari_plot/components/camera.py +++ b/napari_plot/components/camera.py @@ -1,4 +1,5 @@ """Camera model""" + import typing as ty from enum import Enum diff --git a/napari_plot/components/dragtool.py b/napari_plot/components/dragtool.py index e7c21bb..7bcfd07 100644 --- a/napari_plot/components/dragtool.py +++ b/napari_plot/components/dragtool.py @@ -1,4 +1,5 @@ """Tool model.""" + import typing as ty from enum import Enum diff --git a/napari_plot/components/gridlines.py b/napari_plot/components/gridlines.py index 0536301..7d9d341 100644 --- a/napari_plot/components/gridlines.py +++ b/napari_plot/components/gridlines.py @@ -1,4 +1,5 @@ """Gridlines""" + from napari.utils.events import EventedModel diff --git a/napari_plot/components/layerlist.py b/napari_plot/components/layerlist.py index 999dc29..76edcd1 100644 --- a/napari_plot/components/layerlist.py +++ b/napari_plot/components/layerlist.py @@ -1,4 +1,5 @@ """Layer list""" + from napari.components.layerlist import LayerList as _LayerList diff --git a/napari_plot/components/tools.py b/napari_plot/components/tools.py index 0510e0e..f9f6eeb 100644 --- a/napari_plot/components/tools.py +++ b/napari_plot/components/tools.py @@ -1,4 +1,5 @@ """Zoom-box tool.""" + import typing as ty from enum import Enum diff --git a/napari_plot/components/viewer_model.py b/napari_plot/components/viewer_model.py index 87c18e8..9426526 100644 --- a/napari_plot/components/viewer_model.py +++ b/napari_plot/components/viewer_model.py @@ -1,4 +1,5 @@ """Viewer model""" + import inspect import typing as ty import warnings diff --git a/napari_plot/layers/__init__.py b/napari_plot/layers/__init__.py index ca14306..9a13118 100644 --- a/napari_plot/layers/__init__.py +++ b/napari_plot/layers/__init__.py @@ -4,6 +4,7 @@ `visual node `_ to the super constructor. """ + from napari.layers.image import Image # noqa: F401 from napari.layers.points import Points # noqa: F401 from napari.layers.shapes import Shapes # noqa: F401 diff --git a/napari_plot/layers/base.py b/napari_plot/layers/base.py index 00ccdd7..ed48ea8 100644 --- a/napari_plot/layers/base.py +++ b/napari_plot/layers/base.py @@ -1,4 +1,5 @@ """Napari-plot base layer""" + import warnings from contextlib import contextmanager diff --git a/napari_plot/layers/centroids/__init__.py b/napari_plot/layers/centroids/__init__.py index 757b6fb..9b2ab78 100644 --- a/napari_plot/layers/centroids/__init__.py +++ b/napari_plot/layers/centroids/__init__.py @@ -1,2 +1,3 @@ """Init""" + from napari_plot.layers.centroids.centroids import Centroids # noqa: F401 diff --git a/napari_plot/layers/centroids/_centroids_constants.py b/napari_plot/layers/centroids/_centroids_constants.py index 5e0c3c3..7eccfa4 100644 --- a/napari_plot/layers/centroids/_centroids_constants.py +++ b/napari_plot/layers/centroids/_centroids_constants.py @@ -1,4 +1,5 @@ """Line constants""" + from enum import Enum, auto from napari.utils.misc import StringEnum diff --git a/napari_plot/layers/centroids/_centroids_utils.py b/napari_plot/layers/centroids/_centroids_utils.py index 9505160..6bc30af 100644 --- a/napari_plot/layers/centroids/_centroids_utils.py +++ b/napari_plot/layers/centroids/_centroids_utils.py @@ -1,4 +1,5 @@ """Various utilities.""" + import typing as ty import numpy as np diff --git a/napari_plot/layers/centroids/_tests/test_centroids.py b/napari_plot/layers/centroids/_tests/test_centroids.py index eef4397..98ea759 100644 --- a/napari_plot/layers/centroids/_tests/test_centroids.py +++ b/napari_plot/layers/centroids/_tests/test_centroids.py @@ -1,4 +1,5 @@ """Test MultiLine.""" + import numpy as np import pytest diff --git a/napari_plot/layers/centroids/centroids.py b/napari_plot/layers/centroids/centroids.py index 009fba4..ce23bff 100644 --- a/napari_plot/layers/centroids/centroids.py +++ b/napari_plot/layers/centroids/centroids.py @@ -1,4 +1,5 @@ """Line layer""" + import numpy as np from napari.layers.utils.color_transformations import normalize_and_broadcast_colors, transform_color_with_defaults from napari.utils.events import Event diff --git a/napari_plot/layers/infline/__init__.py b/napari_plot/layers/infline/__init__.py index c6e7899..78f3d37 100644 --- a/napari_plot/layers/infline/__init__.py +++ b/napari_plot/layers/infline/__init__.py @@ -1,4 +1,5 @@ """Infinite line""" + from napari_plot.layers.infline import _infline_key_bindings from napari_plot.layers.infline.infline import InfLine # noqa: F401 diff --git a/napari_plot/layers/infline/_infline.py b/napari_plot/layers/infline/_infline.py index 334daab..3686f11 100644 --- a/napari_plot/layers/infline/_infline.py +++ b/napari_plot/layers/infline/_infline.py @@ -1,4 +1,5 @@ """Infinite line.""" + from napari_plot.layers.infline._infline_constants import Orientation diff --git a/napari_plot/layers/infline/_infline_constants.py b/napari_plot/layers/infline/_infline_constants.py index b4cf870..4c6f339 100644 --- a/napari_plot/layers/infline/_infline_constants.py +++ b/napari_plot/layers/infline/_infline_constants.py @@ -1,4 +1,5 @@ """Region constants""" + from enum import Enum, auto from napari.utils.misc import StringEnum diff --git a/napari_plot/layers/infline/_infline_key_bindings.py b/napari_plot/layers/infline/_infline_key_bindings.py index c833f13..54dfcbf 100644 --- a/napari_plot/layers/infline/_infline_key_bindings.py +++ b/napari_plot/layers/infline/_infline_key_bindings.py @@ -1,4 +1,5 @@ """Add keybindings to the layer""" + from napari_plot.layers.infline._infline_constants import Mode from napari_plot.layers.infline.infline import InfLine diff --git a/napari_plot/layers/infline/_infline_list.py b/napari_plot/layers/infline/_infline_list.py index 659333b..de6a7e9 100644 --- a/napari_plot/layers/infline/_infline_list.py +++ b/napari_plot/layers/infline/_infline_list.py @@ -1,4 +1,5 @@ """Infinite line list.""" + import typing as ty import numpy as np diff --git a/napari_plot/layers/infline/_infline_mouse_bindings.py b/napari_plot/layers/infline/_infline_mouse_bindings.py index ff219e0..fda8485 100644 --- a/napari_plot/layers/infline/_infline_mouse_bindings.py +++ b/napari_plot/layers/infline/_infline_mouse_bindings.py @@ -1,4 +1,5 @@ """Mouse bindings""" + from copy import copy import numpy as np diff --git a/napari_plot/layers/infline/_infline_utils.py b/napari_plot/layers/infline/_infline_utils.py index fa9b683..c62196c 100644 --- a/napari_plot/layers/infline/_infline_utils.py +++ b/napari_plot/layers/infline/_infline_utils.py @@ -1,4 +1,5 @@ """Infinite line utilities.""" + import typing as ty import numpy as np diff --git a/napari_plot/layers/infline/_tests/test_infline.py b/napari_plot/layers/infline/_tests/test_infline.py index 576a131..0be5c63 100644 --- a/napari_plot/layers/infline/_tests/test_infline.py +++ b/napari_plot/layers/infline/_tests/test_infline.py @@ -1,4 +1,5 @@ """Inflines.""" + import numpy as np import pytest diff --git a/napari_plot/layers/infline/_tests/test_infline_list.py b/napari_plot/layers/infline/_tests/test_infline_list.py index 67c8f66..b1f6e79 100644 --- a/napari_plot/layers/infline/_tests/test_infline_list.py +++ b/napari_plot/layers/infline/_tests/test_infline_list.py @@ -1,4 +1,5 @@ """Test InfLineList""" + import numpy as np import pytest diff --git a/napari_plot/layers/infline/_tests/test_infline_mouse_bindings.py b/napari_plot/layers/infline/_tests/test_infline_mouse_bindings.py index 9ca16bb..7721b21 100644 --- a/napari_plot/layers/infline/_tests/test_infline_mouse_bindings.py +++ b/napari_plot/layers/infline/_tests/test_infline_mouse_bindings.py @@ -1,4 +1,5 @@ """Test regions mouse bindings.""" + import collections import numpy as np diff --git a/napari_plot/layers/infline/_tests/test_infline_utils.py b/napari_plot/layers/infline/_tests/test_infline_utils.py index 1635b22..4d6b965 100644 --- a/napari_plot/layers/infline/_tests/test_infline_utils.py +++ b/napari_plot/layers/infline/_tests/test_infline_utils.py @@ -1,4 +1,5 @@ """Test utilities""" + import numpy as np import pytest diff --git a/napari_plot/layers/infline/infline.py b/napari_plot/layers/infline/infline.py index be756ae..50e539b 100644 --- a/napari_plot/layers/infline/infline.py +++ b/napari_plot/layers/infline/infline.py @@ -1,4 +1,5 @@ """Infinite region""" + import typing as ty from copy import copy diff --git a/napari_plot/layers/line/__init__.py b/napari_plot/layers/line/__init__.py index d52f090..479dec4 100644 --- a/napari_plot/layers/line/__init__.py +++ b/napari_plot/layers/line/__init__.py @@ -1,2 +1,3 @@ """Line""" + from napari_plot.layers.line.line import Line # noqa: F401 diff --git a/napari_plot/layers/line/_line_constants.py b/napari_plot/layers/line/_line_constants.py index 3c15f79..d684ff1 100644 --- a/napari_plot/layers/line/_line_constants.py +++ b/napari_plot/layers/line/_line_constants.py @@ -1,4 +1,5 @@ """Line constants""" + from enum import auto from napari.utils.misc import StringEnum diff --git a/napari_plot/layers/line/_tests/test_line.py b/napari_plot/layers/line/_tests/test_line.py index 53950ce..f97d838 100644 --- a/napari_plot/layers/line/_tests/test_line.py +++ b/napari_plot/layers/line/_tests/test_line.py @@ -1,4 +1,5 @@ """Test Line layer.""" + import numpy as np import pytest diff --git a/napari_plot/layers/line/line.py b/napari_plot/layers/line/line.py index 01e4ab4..f17844e 100644 --- a/napari_plot/layers/line/line.py +++ b/napari_plot/layers/line/line.py @@ -1,4 +1,5 @@ """Line layer""" + import numpy as np from napari.utils.colormaps.standardize_color import transform_color from napari.utils.events import Event diff --git a/napari_plot/layers/multiline/__init__.py b/napari_plot/layers/multiline/__init__.py index 4561bd5..82422b9 100644 --- a/napari_plot/layers/multiline/__init__.py +++ b/napari_plot/layers/multiline/__init__.py @@ -1,2 +1,3 @@ """Init""" + from napari_plot.layers.multiline.multiline import MultiLine # noqa: F401 diff --git a/napari_plot/layers/multiline/_multiline_constants.py b/napari_plot/layers/multiline/_multiline_constants.py index 81fe595..219d1b4 100644 --- a/napari_plot/layers/multiline/_multiline_constants.py +++ b/napari_plot/layers/multiline/_multiline_constants.py @@ -1,4 +1,5 @@ """Multiline constants""" + from enum import auto from napari.utils.misc import StringEnum diff --git a/napari_plot/layers/multiline/_multiline_list.py b/napari_plot/layers/multiline/_multiline_list.py index e135636..ef3f600 100644 --- a/napari_plot/layers/multiline/_multiline_list.py +++ b/napari_plot/layers/multiline/_multiline_list.py @@ -1,4 +1,5 @@ """Container class for MultiLine data.""" + import typing as ty import numpy as np diff --git a/napari_plot/layers/multiline/_multiline_utils.py b/napari_plot/layers/multiline/_multiline_utils.py index f32460b..809a471 100644 --- a/napari_plot/layers/multiline/_multiline_utils.py +++ b/napari_plot/layers/multiline/_multiline_utils.py @@ -1,4 +1,5 @@ """Utilities.""" + import typing as ty import numpy as np diff --git a/napari_plot/layers/multiline/_tests/test_multiline.py b/napari_plot/layers/multiline/_tests/test_multiline.py index 305db9b..7cc8fbe 100644 --- a/napari_plot/layers/multiline/_tests/test_multiline.py +++ b/napari_plot/layers/multiline/_tests/test_multiline.py @@ -1,4 +1,5 @@ """Test MultiLine.""" + import numpy as np import pytest diff --git a/napari_plot/layers/multiline/_tests/test_multiline_list.py b/napari_plot/layers/multiline/_tests/test_multiline_list.py index a41aec8..c537532 100644 --- a/napari_plot/layers/multiline/_tests/test_multiline_list.py +++ b/napari_plot/layers/multiline/_tests/test_multiline_list.py @@ -1,4 +1,5 @@ """Test MultiLineList""" + import numpy as np import pytest diff --git a/napari_plot/layers/multiline/_tests/test_multiline_utils.py b/napari_plot/layers/multiline/_tests/test_multiline_utils.py index 766446d..c210806 100644 --- a/napari_plot/layers/multiline/_tests/test_multiline_utils.py +++ b/napari_plot/layers/multiline/_tests/test_multiline_utils.py @@ -1,4 +1,5 @@ """Test utilities.""" + import numpy as np import pytest diff --git a/napari_plot/layers/multiline/multiline.py b/napari_plot/layers/multiline/multiline.py index 19743ef..688f024 100644 --- a/napari_plot/layers/multiline/multiline.py +++ b/napari_plot/layers/multiline/multiline.py @@ -1,4 +1,5 @@ """MultiLine layer.""" + import numpy as np from napari.layers.utils.color_transformations import ( ColorType, diff --git a/napari_plot/layers/region/__init__.py b/napari_plot/layers/region/__init__.py index 338c293..794365e 100644 --- a/napari_plot/layers/region/__init__.py +++ b/napari_plot/layers/region/__init__.py @@ -1,4 +1,5 @@ """Init""" + from napari_plot.layers.region import _region_key_bindings from napari_plot.layers.region.region import Region # noqa: F401 diff --git a/napari_plot/layers/region/_region.py b/napari_plot/layers/region/_region.py index 1d6d9a4..ec53ed1 100644 --- a/napari_plot/layers/region/_region.py +++ b/napari_plot/layers/region/_region.py @@ -1,4 +1,5 @@ """Region based on Rectangle.""" + from napari.layers.shapes._shapes_models.rectangle import Rectangle from napari_plot.layers.region._region_constants import Orientation diff --git a/napari_plot/layers/region/_region_constants.py b/napari_plot/layers/region/_region_constants.py index 6109886..0690bd2 100644 --- a/napari_plot/layers/region/_region_constants.py +++ b/napari_plot/layers/region/_region_constants.py @@ -1,4 +1,5 @@ """Region constants""" + from enum import Enum, auto from napari.utils.misc import StringEnum diff --git a/napari_plot/layers/region/_region_key_bindings.py b/napari_plot/layers/region/_region_key_bindings.py index 491c3e7..a51fc3b 100644 --- a/napari_plot/layers/region/_region_key_bindings.py +++ b/napari_plot/layers/region/_region_key_bindings.py @@ -1,4 +1,5 @@ """Add keybindings to the layer""" + from napari_plot.layers.region._region_constants import Mode from napari_plot.layers.region.region import Region diff --git a/napari_plot/layers/region/_region_list.py b/napari_plot/layers/region/_region_list.py index 9f6a2ec..cbfdb3d 100644 --- a/napari_plot/layers/region/_region_list.py +++ b/napari_plot/layers/region/_region_list.py @@ -1,4 +1,5 @@ """Region list.""" + import typing as ty import numpy as np diff --git a/napari_plot/layers/region/_region_mouse_bindings.py b/napari_plot/layers/region/_region_mouse_bindings.py index 18c0c4a..a8c2a78 100644 --- a/napari_plot/layers/region/_region_mouse_bindings.py +++ b/napari_plot/layers/region/_region_mouse_bindings.py @@ -1,4 +1,5 @@ """Mouse bindings.""" + from copy import copy import numpy as np diff --git a/napari_plot/layers/region/_region_utils.py b/napari_plot/layers/region/_region_utils.py index 5d14013..14b9c9f 100644 --- a/napari_plot/layers/region/_region_utils.py +++ b/napari_plot/layers/region/_region_utils.py @@ -1,4 +1,5 @@ """Region utils.""" + import typing as ty import numpy as np diff --git a/napari_plot/layers/region/_tests/test_region.py b/napari_plot/layers/region/_tests/test_region.py index 9906dbb..dee753f 100644 --- a/napari_plot/layers/region/_tests/test_region.py +++ b/napari_plot/layers/region/_tests/test_region.py @@ -1,4 +1,5 @@ """Regions.""" + import numpy as np import pytest diff --git a/napari_plot/layers/region/_tests/test_region_mouse_bindings.py b/napari_plot/layers/region/_tests/test_region_mouse_bindings.py index da0d73a..35c2498 100644 --- a/napari_plot/layers/region/_tests/test_region_mouse_bindings.py +++ b/napari_plot/layers/region/_tests/test_region_mouse_bindings.py @@ -1,4 +1,5 @@ """Test regions mouse bindings.""" + import collections import numpy as np diff --git a/napari_plot/layers/region/region.py b/napari_plot/layers/region/region.py index 28786f8..a612f1a 100644 --- a/napari_plot/layers/region/region.py +++ b/napari_plot/layers/region/region.py @@ -1,4 +1,5 @@ """Infinite region""" + import typing as ty import warnings from copy import copy diff --git a/napari_plot/layers/scatter/__init__.py b/napari_plot/layers/scatter/__init__.py index c67f240..8fa3bc5 100644 --- a/napari_plot/layers/scatter/__init__.py +++ b/napari_plot/layers/scatter/__init__.py @@ -1,2 +1,3 @@ """Scatter""" + from napari_plot.layers.scatter.scatter import Scatter # noqa: F401 diff --git a/napari_plot/layers/scatter/_tests/test_scatter.py b/napari_plot/layers/scatter/_tests/test_scatter.py index 9a3528c..0347335 100644 --- a/napari_plot/layers/scatter/_tests/test_scatter.py +++ b/napari_plot/layers/scatter/_tests/test_scatter.py @@ -1,4 +1,5 @@ """Test scatter layer.""" + from itertools import cycle, islice import numpy as np diff --git a/napari_plot/layers/scatter/scatter.py b/napari_plot/layers/scatter/scatter.py index 0fc57c6..25d9f8e 100644 --- a/napari_plot/layers/scatter/scatter.py +++ b/napari_plot/layers/scatter/scatter.py @@ -1,4 +1,5 @@ """Scatter layer.""" + import numpy as np from napari.layers import Points from napari.layers.points._points_utils import fix_data_points diff --git a/napari_plot/resources/__init__.py b/napari_plot/resources/__init__.py index a684f12..cde4ac8 100644 --- a/napari_plot/resources/__init__.py +++ b/napari_plot/resources/__init__.py @@ -1,4 +1,5 @@ """Get all paths.""" + from pathlib import Path from napari._qt.qt_resources import STYLES, get_stylesheet # noqa diff --git a/napari_plot/utils/_tests/test_utilities.py b/napari_plot/utils/_tests/test_utilities.py index d85339d..c4eb0f1 100644 --- a/napari_plot/utils/_tests/test_utilities.py +++ b/napari_plot/utils/_tests/test_utilities.py @@ -1,4 +1,5 @@ """Test utilities.""" + import numpy as np from napari.utils.events import EventedList diff --git a/napari_plot/utils/utilities.py b/napari_plot/utils/utilities.py index 97f60d6..a55cc23 100644 --- a/napari_plot/utils/utilities.py +++ b/napari_plot/utils/utilities.py @@ -1,4 +1,5 @@ """Various utilities""" + import typing as ty from contextlib import suppress diff --git a/napari_plot/utils/vendored/pydevd_reload.py b/napari_plot/utils/vendored/pydevd_reload.py index 2471559..f678158 100644 --- a/napari_plot/utils/vendored/pydevd_reload.py +++ b/napari_plot/utils/vendored/pydevd_reload.py @@ -100,6 +100,7 @@ target namespace. """ + import types NO_DEBUG = 0 diff --git a/napari_plot/viewer.py b/napari_plot/viewer.py index b4e0ff5..abd2649 100644 --- a/napari_plot/viewer.py +++ b/napari_plot/viewer.py @@ -1,4 +1,5 @@ """Viewer instance.""" + import typing as ty from weakref import WeakSet