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 Dec 2, 2024
1 parent 6a4fc65 commit 34c5405
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/napari_omero/plugins/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
import dask.array as da
from dask.delayed import delayed
from napari.types import LayerData
from vispy.color import Colormap

from omero.cli import ProxyStringType
from omero.gateway import BlitzGateway, ImageWrapper
from omero.model import IObject
from vispy.color import Colormap

from ..utils import PIXEL_TYPES, lookup_obj, parse_omero_url, timer
from ..widgets import QGateWay
Expand Down
3 changes: 2 additions & 1 deletion src/napari_omero/plugins/masks.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from typing import List

import numpy as np
from omero_rois import mask_from_binary_image

from omero.gateway import ImageWrapper
from omero.model import RoiI
from omero_rois import mask_from_binary_image


def create_roi(image: ImageWrapper, shapes) -> RoiI:
Expand Down
5 changes: 3 additions & 2 deletions src/napari_omero/plugins/omero.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

import napari
import numpy
import omero.clients
from napari.layers.labels.labels import Labels as labels_layer
from napari.layers.points.points import Points as points_layer
from napari.layers.shapes.shapes import Shapes as shapes_layer
from qtpy.QtWidgets import QPushButton

import omero.clients
from omero.cli import CLI, BaseControl, ProxyStringType
from omero.gateway import BlitzGateway, PixelsWrapper
from omero.model import (
Expand All @@ -20,7 +22,6 @@
RoiI,
)
from omero.rtypes import rdouble, rint, rstring
from qtpy.QtWidgets import QPushButton

from ..utils import lookup_obj, obj_to_proxy_string
from .masks import save_labels
Expand Down
1 change: 1 addition & 0 deletions src/napari_omero/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import Dict, Optional

import numpy as np

from omero.cli import ProxyStringType
from omero.gateway import BlitzGateway, BlitzObjectWrapper
from omero.model import IObject
Expand Down
2 changes: 1 addition & 1 deletion src/napari_omero/widgets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from .login import LoginForm
from .main import OMEROWidget

__all__ = ["OMEROWidget", "QGateWay", "LoginForm"]
__all__ = ["LoginForm", "OMEROWidget", "QGateWay"]
7 changes: 4 additions & 3 deletions src/napari_omero/widgets/gateway.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import atexit
from typing import TYPE_CHECKING, Callable, Generator, Optional, Tuple

from qtpy.QtCore import QObject, Signal

import omero.gateway
from omero.clients import BaseClient
from omero.gateway import BlitzGateway, BlitzObjectWrapper, PixelsWrapper
from omero.util.sessions import SessionsStore
from qtpy.QtCore import QObject, Signal

SessionStats = Tuple[BaseClient, str, int, int]

Expand All @@ -31,8 +32,8 @@ def __init__(self, parent=None):
self.store = SessionsStore()
self.destroyed.connect(self.close)
atexit.register(self.close)
self.worker: Optional["WorkerBase"] = None
self._next_worker: Optional["WorkerBase"] = None
self.worker: Optional[WorkerBase] = None
self._next_worker: Optional[WorkerBase] = None

@property
def conn(self):
Expand Down
3 changes: 2 additions & 1 deletion src/napari_omero/widgets/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from omero.gateway import BlitzObjectWrapper
from qtpy.QtCore import (
QCoreApplication,
QItemSelection,
Expand All @@ -15,6 +14,8 @@
QWidget,
)

from omero.gateway import BlitzObjectWrapper

from .gateway import QGateWay
from .login import LoginForm
from .thumb_grid import ThumbGrid
Expand Down
3 changes: 2 additions & 1 deletion src/napari_omero/widgets/tree_model.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from typing import Dict, Optional

from omero.gateway import BlitzObjectWrapper, _DatasetWrapper, _ImageWrapper
from qtpy.QtCore import QModelIndex
from qtpy.QtGui import QStandardItem, QStandardItemModel

from omero.gateway import BlitzObjectWrapper, _DatasetWrapper, _ImageWrapper

from .gateway import QGateWay


Expand Down

0 comments on commit 34c5405

Please sign in to comment.