From ca6b595686531329a8f7a0d096000f103076ca1a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 08:14:28 -0500 Subject: [PATCH] ci(pre-commit.ci): autoupdate (#675) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci(pre-commit.ci): autoupdate updates: - [github.com/abravalheri/validate-pyproject: v0.19 → v0.22](https://github.com/abravalheri/validate-pyproject/compare/v0.19...v0.22) - [github.com/crate-ci/typos: v1.24.5 → v1.27.0](https://github.com/crate-ci/typos/compare/v1.24.5...v1.27.0) - [github.com/astral-sh/ruff-pre-commit: v0.6.4 → v0.7.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.4...v0.7.2) - [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.13.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.11.2...v1.13.0) * style(pre-commit.ci): auto fixes [...] * fix linting * remove x --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Talley Lambert --- .pre-commit-config.yaml | 8 ++++---- src/magicgui/_util.py | 2 +- src/magicgui/schema/_ui_field.py | 2 +- src/magicgui/widgets/_function_gui.py | 4 ++-- src/magicgui/widgets/bases/_categorical_widget.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9614433f..eabbee82f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,23 +5,23 @@ ci: repos: - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.19 + rev: v0.22 hooks: - id: validate-pyproject - repo: https://github.com/crate-ci/typos - rev: v1.24.5 + rev: typos-dict-v0.11.34 hooks: - id: typos - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.4 + rev: v0.7.3 hooks: - id: ruff args: ["--fix"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.11.2 + rev: v1.13.0 hooks: - id: mypy files: "^src/" diff --git a/src/magicgui/_util.py b/src/magicgui/_util.py index 8f113acaf..6f2cd496a 100644 --- a/src/magicgui/_util.py +++ b/src/magicgui/_util.py @@ -66,7 +66,7 @@ def call_it() -> T: return debounced - return decorator if function is None else decorator(function) # type: ignore + return decorator if function is None else decorator(function) def throttle(t: float) -> Callable[[Callable[P, T]], Callable[P, T | None]]: diff --git a/src/magicgui/schema/_ui_field.py b/src/magicgui/schema/_ui_field.py index f6b825a19..67f61bb7a 100644 --- a/src/magicgui/schema/_ui_field.py +++ b/src/magicgui/schema/_ui_field.py @@ -166,7 +166,7 @@ def __post_init__(self) -> None: decimal_places: int | None = field( default=None, metadata={ - "descripion": "Maximum number of digits within the decimal. It does " + "description": "Maximum number of digits within the decimal. It does " "not include trailing decimal zeroes." }, ) diff --git a/src/magicgui/widgets/_function_gui.py b/src/magicgui/widgets/_function_gui.py index b15455ce9..d94f4a041 100644 --- a/src/magicgui/widgets/_function_gui.py +++ b/src/magicgui/widgets/_function_gui.py @@ -225,7 +225,7 @@ def _disable_button_and_call() -> None: self._call_button = cast(PushButton, self._call_button) self._call_button.enabled = False try: - self.__call__() + self.__call__() # type: ignore [call-arg] finally: self._call_button.enabled = True @@ -257,7 +257,7 @@ def _on_change(self) -> None: if self.persist: self._dump() if self._auto_call: - self() + self() # type: ignore [call-arg] @property def call_button(self) -> PushButton | None: diff --git a/src/magicgui/widgets/bases/_categorical_widget.py b/src/magicgui/widgets/bases/_categorical_widget.py index 0ba1484db..d172caa3b 100644 --- a/src/magicgui/widgets/bases/_categorical_widget.py +++ b/src/magicgui/widgets/bases/_categorical_widget.py @@ -131,7 +131,7 @@ def choices(self) -> tuple[T | None, ...]: @choices.setter def choices(self, choices: ChoicesType) -> None: - str_func: Callable = _get_name if isinstance(choices, EnumMeta) else str # type: ignore + str_func: Callable = _get_name if isinstance(choices, EnumMeta) else str if isinstance(choices, dict): if "choices" not in choices or "key" not in choices: raise ValueError(