Skip to content

Commit

Permalink
Merge branch 'main' into py313
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Nov 8, 2024
2 parents 2af42c5 + ca6b595 commit 83822e5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
2 changes: 1 addition & 1 deletion src/magicgui/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]:
Expand Down
2 changes: 1 addition & 1 deletion src/magicgui/schema/_ui_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
},
)
Expand Down
4 changes: 2 additions & 2 deletions src/magicgui/widgets/_function_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/magicgui/widgets/bases/_categorical_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 83822e5

Please sign in to comment.