Skip to content

Commit de38703

Browse files
committed
fixes
1 parent 549b7af commit de38703

File tree

5 files changed

+19
-12
lines changed

5 files changed

+19
-12
lines changed

.pre-commit-config.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,27 @@ repos:
99
hooks:
1010
- id: validate-pyproject
1111

12-
- repo: https://github.com/crate-ci/typos
13-
rev: v1.33.1
12+
- repo: https://github.com/rhysd/actionlint
13+
rev: v1.7.9
14+
hooks:
15+
- id: actionlint
16+
files: "^\\.github/workflows/.*\\.ya?ml$"
17+
18+
- repo: https://github.com/adhtruong/mirrors-typos
19+
rev: v1.40.0
1420
hooks:
1521
- id: typos
22+
args: [--force-exclude] # omitting --write-changes
1623

1724
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: v0.11.12
25+
rev: v0.14.8
1926
hooks:
2027
- id: ruff-check
2128
args: ["--fix", "--unsafe-fixes"]
2229
- id: ruff-format
2330

2431
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: v1.16.0
32+
rev: v1.19.0
2633
hooks:
2734
- id: mypy
2835
files: "^src/"

docs/examples/napari/napari_parameter_sweep.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# - 'auto_call' tells magicgui to call the function when a parameter changes
4949
# - we use 'widget_type' to override the default "float" widget on sigma,
5050
# and provide a maximum valid value.
51-
# - we contstrain the possible choices for 'mode'
51+
# - we constrain the possible choices for 'mode'
5252
@magicgui(
5353
auto_call=True,
5454
sigma={"widget_type": "FloatSlider", "max": 6},
@@ -173,7 +173,7 @@ def do_something_with_result(result): ...
173173
# - 'auto_call' tells magicgui to call the function when a parameter changes
174174
# - we use 'widget_type' to override the default "float" widget on sigma,
175175
# and provide a maximum valid value.
176-
# - we contstrain the possible choices for 'mode'
176+
# - we constrain the possible choices for 'mode'
177177
@magicgui(
178178
auto_call=True,
179179
sigma={"widget_type": "FloatSlider", "max": 6},

docs/gallery_conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def qt_window_scraper(block: tuple, script: GalleryScript) -> str:
2525
Returns
2626
-------
2727
md : str
28-
The ReSTructuredText that will be rendered to HTML containing
28+
The reStructuredText that will be rendered to HTML containing
2929
the images. This is often produced by :func:`figure_md_or_html`.
3030
"""
3131
imgpath_iter = script.run_vars.image_path_iterator
@@ -61,7 +61,7 @@ def napari_image_scraper(block, script: GalleryScript):
6161
Returns
6262
-------
6363
md : str
64-
The ReSTructuredText that will be rendered to HTML containing
64+
The reStructuredText that will be rendered to HTML containing
6565
the images. This is often produced by :func:`figure_md_or_html`.
6666
"""
6767
viewer = napari.current_viewer()

src/magicgui/type_map/_type_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def match_type(self, type_: Any, default: Any | None = None) -> WidgetTuple | No
149149

150150
if safe_issubclass(origin, set):
151151
for arg in get_args(type_):
152-
if get_origin(arg) is Literal:
152+
if get_origin(arg) is Literal: # type: ignore [comparison-overlap]
153153
return widgets.Select, {"choices": get_args(arg)}
154154

155155
pint = sys.modules.get("pint")

src/magicgui/widgets/bases/_ranged_widget.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ def __init__(
240240
self._min_pos = min_pos
241241
self._max_pos = max_pos
242242
ValueWidget.__init__(
243-
self, # type: ignore
244-
value=value, # type: ignore
245-
bind=bind, # type: ignore
243+
self,
244+
value=value,
245+
bind=bind,
246246
nullable=nullable,
247247
**base_widget_kwargs,
248248
)

0 commit comments

Comments
 (0)