Skip to content

Commit

Permalink
ci(pre-commit.ci): autoupdate (#377)
Browse files Browse the repository at this point in the history
* ci(pre-commit.ci): autoupdate

updates:
- [github.com/crate-ci/typos: v1.26.0 → v1.27.0](crate-ci/typos@v1.26.0...v1.27.0)
- [github.com/astral-sh/ruff-pre-commit: v0.6.9 → v0.7.2](astral-sh/ruff-pre-commit@v0.6.9...v0.7.2)
- [github.com/abravalheri/validate-pyproject: v0.20.2 → v0.22](abravalheri/validate-pyproject@v0.20.2...v0.22)
- [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.13.0](pre-commit/mirrors-mypy@v1.11.2...v1.13.0)

* fix: fix pre-commit

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: fdrgsp <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and fdrgsp authored Nov 8, 2024
1 parent e80b7c5 commit 7277aa6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ ci:

repos:
- repo: https://github.com/crate-ci/typos
rev: v1.26.0
rev: v1.27.0
hooks:
- id: typos

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.7.2
hooks:
- id: ruff
args: [--fix, --unsafe-fixes]
- id: ruff-format

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.20.2
rev: v0.22
hooks:
- id: validate-pyproject

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.13.0
hooks:
- id: mypy
files: "^src/"
Expand Down
20 changes: 10 additions & 10 deletions src/pymmcore_widgets/mda/_core_positions.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,16 +391,16 @@ def _on_selection_change(self) -> None:
# if 'af_per_position' is not checked and the autofocus was not locked
# before moving, we do not use autofocus.
if table_af_offset is not None or af_offset is not None:
self._mmc.setAutoFocusOffset(
table_af_offset if table_af_offset is not None else af_offset
)
try:
self._mmc.enableContinuousFocus(False)
self._perform_autofocus()
self._mmc.enableContinuousFocus(af_engaged)
self._mmc.waitForSystem()
except RuntimeError as e:
logger.warning("Hardware autofocus failed. %s", e)
_af = table_af_offset if table_af_offset is not None else af_offset
if _af is not None:
self._mmc.setAutoFocusOffset(_af)
try:
self._mmc.enableContinuousFocus(False)
self._perform_autofocus()
self._mmc.enableContinuousFocus(af_engaged)
self._mmc.waitForSystem()
except RuntimeError as e:
logger.warning("Hardware autofocus failed. %s", e)

self._mmc.waitForSystem()

Expand Down

0 comments on commit 7277aa6

Please sign in to comment.