Skip to content

Commit

Permalink
style(pre-commit.ci): auto fixes [...]
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jan 21, 2025
1 parent 43a4414 commit 4753e5f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
7 changes: 6 additions & 1 deletion src/ndv/views/_jupyter/_array_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,12 @@ def __init__(
width = "604px"

btns = widgets.HBox(
[self._channel_mode_combo, self._ndims_btn, self._add_roi_btn, self._reset_zoom_btn],
[
self._channel_mode_combo,
self._ndims_btn,
self._add_roi_btn,
self._reset_zoom_btn,
],
layout=widgets.Layout(justify_content="flex-end"),
)
self.layout = widgets.VBox(
Expand Down
7 changes: 5 additions & 2 deletions src/ndv/views/_qt/_array_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
from ndv.models._array_display_model import ChannelMode
from ndv.models._viewer_model import ArrayViewerModel, InteractionMode
from ndv.views.bases import ArrayView, LutView
from ndv.views.bases._graphics._canvas_elements import CanvasElement, RectangularROI

if TYPE_CHECKING:
from collections.abc import Container, Hashable, Mapping, Sequence
Expand All @@ -39,6 +38,7 @@

from ndv._types import AxisKey
from ndv.models._data_display_model import _ArrayDataDisplayModel
from ndv.views.bases._graphics._canvas_elements import CanvasElement, RectangularROI

SLIDER_STYLE = """
QSlider::groove:horizontal {
Expand Down Expand Up @@ -411,7 +411,10 @@ def closeEvent(self, a0: Any) -> None:

class QtArrayView(ArrayView):
def __init__(
self, canvas_widget: QWidget, data_model: _ArrayDataDisplayModel, viewer_model: ArrayViewerModel
self,
canvas_widget: QWidget,
data_model: _ArrayDataDisplayModel,
viewer_model: ArrayViewerModel,
) -> None:
self._data_model = data_model
self._viewer_model = viewer_model
Expand Down
6 changes: 5 additions & 1 deletion src/ndv/views/bases/_array_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ class ArrayView(Viewable):
# model: _ArrayDataDisplayModel is likely a temporary parameter
@abstractmethod
def __init__(
self, canvas_widget: Any, model: _ArrayDataDisplayModel, viewer_model: ArrayViewerModel, **kwargs: Any
self,
canvas_widget: Any,
model: _ArrayDataDisplayModel,
viewer_model: ArrayViewerModel,
**kwargs: Any,
) -> None: ...
@abstractmethod
def create_sliders(self, coords: Mapping[int, Sequence]) -> None: ...
Expand Down
3 changes: 2 additions & 1 deletion src/ndv/views/bases/_graphics/_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
if TYPE_CHECKING:
import numpy as np

from ._canvas_elements import CanvasElement, ImageHandle, RectangularROI
from ndv.models._viewer_model import ArrayViewerModel

from ._canvas_elements import CanvasElement, ImageHandle, RectangularROI


class GraphicsCanvas(Viewable, Mouseable):
"""ABC for graphics canvas providers."""
Expand Down
2 changes: 1 addition & 1 deletion src/ndv/views/bases/_graphics/_canvas_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from abc import abstractmethod
from enum import Enum, auto
from typing import TYPE_CHECKING, Any
from typing import TYPE_CHECKING

from psygnal import Signal

Expand Down

0 comments on commit 4753e5f

Please sign in to comment.