Skip to content

Commit d3c0896

Browse files
ci(pre-commit.ci): autoupdate (#641)
* ci(pre-commit.ci): autoupdate updates: - [github.com/crate-ci/typos: v1.19.0 → v1.20.1](crate-ci/typos@v1.19.0...v1.20.1) - [github.com/astral-sh/ruff-pre-commit: v0.3.0 → v0.3.5](astral-sh/ruff-pre-commit@v0.3.0...v0.3.5) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](pre-commit/mirrors-mypy@v1.8.0...v1.9.0) * style(pre-commit.ci): auto fixes [...] * fix lint * modify matrix * bump minreq * format * bump napari test version * add lxml_html_clean --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Talley Lambert <[email protected]>
1 parent 1e78e6f commit d3c0896

File tree

5 files changed

+32
-23
lines changed

5 files changed

+32
-23
lines changed

.github/workflows/test_and_deploy.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,34 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
python-version: ["3.8", "3.9", "3.10", "3.11"]
30+
python-version: ["3.10", "3.11"]
3131
os: [ubuntu-latest, macos-latest, windows-latest]
32-
qt: [pyqt5, pyside2]
32+
qt: [pyqt6, pyside6]
3333
include:
34-
- python-version: "3.10"
34+
- python-version: "3.8"
3535
os: ubuntu-latest
36-
qt: pyqt6
36+
qt: pyqt5
37+
- python-version: "3.8"
38+
os: macos-13
39+
qt: pyside2
40+
- python-version: "3.8"
41+
os: windows-latest
42+
qt: pyqt5
43+
- python-version: "3.9"
44+
os: macos-13
45+
qt: pyqt5
46+
- python-version: "3.9"
47+
os: ubuntu-latest
48+
qt: pyside2
3749
- python-version: "3.10"
3850
os: ubuntu-latest
39-
qt: pyside6
51+
qt: pyside2
4052
- python-version: "3.12"
4153
os: ubuntu-latest
4254
qt: pyqt6
43-
exclude:
44-
- python-version: "3.11"
45-
qt: pyside2
55+
- python-version: "3.12"
56+
os: ubuntu-latest
57+
qt: pyside6
4658

4759
test-min-reqs:
4860
name: Test min reqs
@@ -93,7 +105,7 @@ jobs:
93105
host-extras: "testing"
94106
qt: pyqt5
95107
python-version: "3.10"
96-
post-install-cmd: "python -m pip install pytest-pretty"
108+
post-install-cmd: "python -m pip install pytest-pretty lxml_html_clean" # just for napari
97109
pytest-args: ${{ matrix.pytest-args }}
98110
strategy:
99111
fail-fast: false
@@ -102,7 +114,7 @@ jobs:
102114
- package: napari/napari
103115
pytest-args: napari/_tests/test_magicgui.py
104116
- package: napari/napari
105-
package-version: "v0.4.18"
117+
package-version: "v0.4.19.post1"
106118
pytest-args: napari/_tests/test_magicgui.py
107119
- package: hanjinliu/magic-class
108120
- package: stardist/stardist-napari

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ repos:
1010
- id: validate-pyproject
1111

1212
- repo: https://github.com/crate-ci/typos
13-
rev: v1.19.0
13+
rev: v1.20.10
1414
hooks:
1515
- id: typos
1616

1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: v0.3.0
18+
rev: v0.4.2
1919
hooks:
2020
- id: ruff
2121
args: ["--fix"]
2222

2323
- repo: https://github.com/pre-commit/mirrors-mypy
24-
rev: v1.8.0
24+
rev: v1.10.0
2525
hooks:
2626
- id: mypy
2727
files: "^src/"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ dependencies = [
3838
"psygnal>=0.6.1",
3939
"qtpy>=1.7.0",
4040
"superqt[iconify]>=0.6.1",
41-
"typing_extensions>=4.1.0",
41+
"typing_extensions>=4.6",
4242
]
4343

4444
# extras

src/magicgui/type_map/_magicgui.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,11 @@ def magicgui(
181181
Examples
182182
--------
183183
>>> @magicgui
184-
... def my_function(a: int = 1, b: str = 'hello'):
184+
... def my_function(a: int = 1, b: str = "hello"):
185185
... pass
186-
...
187186
>>> my_function.show()
188187
>>> my_function.a.value == 1 # True
189-
>>> my_function.b.value = 'world'
188+
>>> my_function.b.value = "world"
190189
"""
191190
return _magicgui(
192191
function=function,
@@ -383,13 +382,12 @@ def magic_factory(
383382
Examples
384383
--------
385384
>>> @magic_factory
386-
... def my_function(a: int = 1, b: str = 'hello'):
385+
... def my_function(a: int = 1, b: str = "hello"):
387386
... pass
388-
...
389387
>>> my_widget = my_function()
390388
>>> my_widget.show()
391389
>>> my_widget.a.value == 1 # True
392-
>>> my_widget.b.value = 'world'
390+
>>> my_widget.b.value = "world"
393391
"""
394392
return _magicgui(
395393
factory=True,
@@ -425,7 +423,6 @@ class MagicFactory(partial, Generic[_FGuiVar]):
425423
--------
426424
>>> def func(x: int, y: str):
427425
... pass
428-
...
429426
>>> factory = MagicFactory(function=func, labels=False)
430427
>>> # factory accepts all the same arguments as magicgui()
431428
>>> widget1 = factory(call_button=True)
@@ -463,7 +460,7 @@ def __new__(
463460
raise TypeError(
464461
"'widget_init' must be a callable that accepts a single argument"
465462
)
466-
obj = super().__new__(cls, magic_class, *args, **keywords) # type: ignore
463+
obj = super().__new__(cls, magic_class, *args, **keywords)
467464
obj._widget_init = widget_init
468465
return obj
469466

src/magicgui/widgets/_image/_mpl_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def to_rgba(self, x, bytes=False, norm=True):
398398
else:
399399
raise ValueError(
400400
"Image RGB array must be uint8 or "
401-
"floating point; found %s" % xx.dtype
401+
f"floating point; found {xx.dtype}"
402402
)
403403
return xx
404404
except AttributeError:

0 commit comments

Comments
 (0)