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(