Skip to content

Commit 779c363

Browse files
style(pre-commit.ci): auto fixes [...]
1 parent 2b598ea commit 779c363

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/ndv/viewer/_backends/_protocols.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def set_range(
100100
def zoom(
101101
self,
102102
factor: Union[float, tuple],
103-
center: tuple = None,
103+
center: tuple | None = None,
104104
) -> None: ...
105105
def refresh(self) -> None: ...
106106
def qwidget(self) -> QWidget: ...

src/ndv/viewer/_backends/_pygfx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ def set_range(
561561
cam.zoom = 1 - margin
562562
self.refresh()
563563

564-
def zoom(self, factor: Union[float, tuple], center: tuple = None):
564+
def zoom(self, factor: Union[float, tuple], center: tuple | None = None):
565565
"""
566566
Zoom in (or out) at the given center.
567567

src/ndv/viewer/_backends/_vispy.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import warnings
44
from contextlib import suppress
5-
from typing import TYPE_CHECKING, Any, Literal, Union, cast
5+
from typing import TYPE_CHECKING, Any, Literal, cast
66
from weakref import WeakKeyDictionary
77

88
import cmap
@@ -580,7 +580,7 @@ def set_range(
580580
max_size = max(x[1], y[1], z[1])
581581
self._camera.scale_factor = max_size + 6
582582

583-
def zoom(self, factor: Union[float, tuple], center: tuple = None):
583+
def zoom(self, factor: float | tuple, center: tuple | None = None):
584584
"""
585585
Zoom in (or out) at the given center.
586586

0 commit comments

Comments
 (0)