Skip to content

Commit 09daae7

Browse files
ci(pre-commit.ci): autoupdate (#215)
* ci(pre-commit.ci): autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0) - [github.com/adhtruong/mirrors-typos: v1.35.5 → v1.40.0](adhtruong/mirrors-typos@v1.35.5...v1.40.0) - [github.com/astral-sh/ruff-pre-commit: v0.12.10 → v0.14.7](astral-sh/ruff-pre-commit@v0.12.10...v0.14.7) - [github.com/pre-commit/mirrors-mypy: v1.17.1 → v1.19.0](pre-commit/mirrors-mypy@v1.17.1...v1.19.0) * style(pre-commit.ci): auto fixes [...] * Fix linting errors --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Gabriel Selzer <[email protected]>
1 parent 402ebaf commit 09daae7

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ci:
55

66
repos:
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v5.0.0
8+
rev: v6.0.0
99
hooks:
1010
- id: trailing-whitespace
1111
exclude: ".*\\.md"
@@ -20,20 +20,20 @@ repos:
2020
- id: validate-pyproject
2121

2222
- repo: https://github.com/adhtruong/mirrors-typos
23-
rev: v1.35.5
23+
rev: v1.40.0
2424
hooks:
2525
- id: typos
2626
args: [--force-exclude] # omitting --write-changes
2727

2828
- repo: https://github.com/astral-sh/ruff-pre-commit
29-
rev: v0.12.10
29+
rev: v0.14.7
3030
hooks:
3131
- id: ruff-check
3232
args: [--fix, --unsafe-fixes]
3333
- id: ruff-format
3434

3535
- repo: https://github.com/pre-commit/mirrors-mypy
36-
rev: v1.17.1
36+
rev: v1.19.0
3737
hooks:
3838
- id: mypy
3939
files: "^src/"

src/ndv/views/_jupyter/_array_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ def _on_viewer_model_event(self, info: EmissionInfo) -> None:
649649
self._progress_spinner.layout.display = "flex" if value else "none"
650650
elif sig_name == "interaction_mode":
651651
# If leaving CanvasMode.CREATE_ROI, uncheck the ROI button
652-
new, old = info.args
652+
_new, old = info.args
653653
if old == InteractionMode.CREATE_ROI:
654654
self._add_roi_btn.value = False
655655
elif sig_name == "show_histogram_button":

src/ndv/views/_pygfx/_array_canvas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def set_range(
522522
cam.show_object(self._scene)
523523

524524
if (bb := self._scene.get_world_bounding_box()) is not None:
525-
width, height, depth = np.ptp(bb, axis=0)
525+
width, height, _depth = np.ptp(bb, axis=0)
526526
if width < 0.01:
527527
width = 1
528528
if height < 0.01:

src/ndv/views/_qt/_array_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ def _on_viewer_model_event(self, info: EmissionInfo) -> None:
908908
self._qwidget._progress_spinner.setVisible(value)
909909
if sig_name == "interaction_mode":
910910
# If leaving CanvasMode.CREATE_ROI, uncheck the ROI button
911-
new, old = info.args
911+
_new, old = info.args
912912
if old == InteractionMode.CREATE_ROI:
913913
self._qwidget.add_roi_btn.setChecked(False)
914914
elif sig_name == "show_histogram_button":

src/ndv/views/_qt/_main_thread.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ def wrapper() -> None:
4242
)
4343
return future
4444

45-
@Slot() # type: ignore [misc]
45+
@Slot() # type: ignore[untyped-decorator]
4646
def _invoke_current(self) -> None:
47+
"""Invokes the current callable."""
4748
"""Invokes the current callable."""
4849
if (cb := self._current_callable) is not None:
4950
cb()
@@ -65,7 +66,7 @@ def call_in_main_thread(
6566
invoker = MainThreadInvoker()
6667
invoker.moveToThread(_APP_THREAD)
6768
_INVOKERS.add(invoker)
68-
return invoker.invoke(func, *args, **kwargs) # type: ignore[no-any-return]
69+
return invoker.invoke(func, *args, **kwargs)
6970

7071
future: Future[T] = Future()
7172
future.set_result(func(*args, **kwargs))

src/ndv/views/_vispy/_plot_widget.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,9 @@ def axis_index(self) -> Literal[0, 1, None]:
300300
return 1
301301
return None
302302

303-
@scene.cameras.PanZoomCamera.rect.setter # type:ignore[misc]
303+
@scene.cameras.PanZoomCamera.rect.setter # type: ignore[untyped-decorator]
304304
def rect(self, args: Any) -> None:
305+
"""Setter for the camera rect."""
305306
# Convert 4-tuple (x, y, w, h) to Rect
306307
if isinstance(args, tuple):
307308
args = geometry.Rect(*args)

src/ndv/views/_wx/_array_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ def _on_viewer_model_event(self, info: EmissionInfo) -> None:
867867
self._wxwidget._top_info.Layout()
868868
elif sig_name == "interaction_mode":
869869
# If leaving CanvasMode.CREATE_ROI, uncheck the ROI button
870-
new, old = info.args
870+
_new, old = info.args
871871
if old == InteractionMode.CREATE_ROI:
872872
self._wxwidget.add_roi_btn.SetValue(False)
873873
elif sig_name == "show_histogram_button":

0 commit comments

Comments
 (0)