Skip to content

Commit 676207b

Browse files
ci(pre-commit.ci): autoupdate (#395)
* ci(pre-commit.ci): autoupdate updates: - [github.com/crate-ci/typos: typos-dict-v0.11.37 → dictgen-v0.3.1](crate-ci/typos@typos-dict-v0.11.37...dictgen-v0.3.1) - [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.8.6](astral-sh/ruff-pre-commit@v0.8.1...v0.8.6) - [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](pre-commit/mirrors-mypy@v1.13.0...v1.14.1) * update and fix pre-commit * xfail another test * fix vispy test * update deps for docs --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Talley Lambert <talley.lambert@gmail.com>
1 parent 0759b73 commit 676207b

9 files changed

Lines changed: 28 additions & 20 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ ci:
55

66
repos:
77
- repo: https://github.com/crate-ci/typos
8-
rev: typos-dict-v0.11.37
8+
rev: dictgen-v0.3.1
99
hooks:
1010
- id: typos
1111

1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: v0.8.1
13+
rev: v0.9.2
1414
hooks:
1515
- id: ruff
1616
args: [--fix, --unsafe-fixes]
@@ -22,7 +22,7 @@ repos:
2222
- id: validate-pyproject
2323

2424
- repo: https://github.com/pre-commit/mirrors-mypy
25-
rev: v1.13.0
25+
rev: v1.14.1
2626
hooks:
2727
- id: mypy
2828
files: "^src/"

pyproject.toml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ dependencies = [
5151
'fonticon-materialdesignicons6',
5252
'pymmcore-plus[cli] >=0.11.0',
5353
'qtpy >=2.0',
54-
'superqt[quantity] >=0.5.3',
54+
'superqt[quantity,cmap] >=0.7.1',
5555
'useq-schema >=0.5.0',
5656
]
5757

@@ -61,20 +61,24 @@ allow-direct-references = true
6161
# extras
6262
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
6363
[project.optional-dependencies]
64+
pyqt5 = ["PyQt5"]
65+
pyside2 = ["PySide2"]
66+
pyqt6 = ["PyQt6"]
67+
pyside6 = ["PySide6==6.7.3"] # pretty hard to find a good match here...
68+
image = [
69+
"vispy",
70+
# fix OSError: dlopen(Quartz.framework/Quartz on vispy
71+
"pyopengl; platform_system == 'Darwin'",
72+
]
73+
6474
test = [
75+
"pymmcore-widgets[image]",
6576
"pytest>=6.0",
6677
"pytest-cov",
6778
"pytest-qt",
6879
"PyYAML",
69-
"vispy",
70-
"cmap",
71-
"zarr",
80+
"zarr<3",
7281
]
73-
pyqt5 = ["PyQt5"]
74-
pyside2 = ["PySide2"]
75-
pyqt6 = ["PyQt6"]
76-
pyside6 = ["PySide6==6.7.3"] # pretty hard to find a good match here...
77-
image = ["vispy"]
7882

7983
dev = [
8084
"cruft",
@@ -86,9 +90,10 @@ dev = [
8690
"pytest-cov",
8791
"pytest",
8892
"rich",
93+
"pyqt6",
8994
]
9095
docs = [
91-
"vispy",
96+
"pymmcore-widgets[image]",
9297
"mkdocs",
9398
"mkdocs-material",
9499
"mkdocstrings-python",

src/pymmcore_widgets/_install_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def _on_install_clicked(self) -> None:
9595
if dest := getattr(self, "_install_dest", None): # for pytest, could expose
9696
cmd = [*cmd, "--dest", dest]
9797

98-
self.feedback_textbox.append(f'Running:\n{" ".join(cmd)}')
98+
self.feedback_textbox.append(f"Running:\n{' '.join(cmd)}")
9999
self._cmd_thread = SubprocessThread(cmd)
100100
self._cmd_thread.stdout_ready.connect(self.feedback_textbox.append)
101101
self._cmd_thread.process_finished.connect(self._on_finished)

src/pymmcore_widgets/hcs/_plate_calibration_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def _update_info(self) -> None:
363363
ico = style.standardIcon(QStyle.StandardPixmap.SP_MessageBoxWarning)
364364
txt += "<br>"
365365
x0, y0 = self._a1_center_xy
366-
txt += f"\nA1 Center [mm]: ({x0/1000:.2f}, {y0/1000:.2f}), "
366+
txt += f"\nA1 Center [mm]: ({x0 / 1000:.2f}, {y0 / 1000:.2f}), "
367367
txt += f"Well Spacing [mm]: ({spacing[0]:.2f}, {spacing[1]:.2f}), "
368368
txt += f"Rotation: {self._rotation}°"
369369
elif len(self._calibrated_wells) < self._min_wells_required:

src/pymmcore_widgets/hcwizard/devices_page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def _remove_selected_devices(self) -> None:
175175
if dev.parent_label == device.name:
176176
children.add(dev)
177177
if children and not asked:
178-
child = f'{"child" if len(children) == 1 else "children"}'
178+
child = f"{'child' if len(children) == 1 else 'children'}"
179179
response = QMessageBox.question(
180180
self,
181181
"Remove Children?",

src/pymmcore_widgets/useq_widgets/_mda_sequence.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ def _check_order(x: str, first: str, second: str) -> bool:
6565
ALLOWED_ORDERS.discard(x)
6666
AF_AXIS_TOOLTIP = "Use Hardware Autofocus on the selected axes."
6767
AF_DISABLED_TOOLTIP = (
68-
"The hardware autofocus cannot be used with absolute Z positions "
69-
"(TOP_BOTTOM mode)."
68+
"The hardware autofocus cannot be used with absolute Z positions (TOP_BOTTOM mode)."
7069
)
7170

7271

src/pymmcore_widgets/useq_widgets/_well_plate_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def drawPlate(self, plan: useq.WellPlate | useq.WellPlatePlan) -> None:
444444
rect = well_rect.translated(screen_x, screen_y)
445445
if item := add_item(rect, pen):
446446
item.setData(DATA_POSITION, pos)
447-
index = tuple(idx.tolist())
447+
index = (idx[0], idx[1])
448448
item.setData(DATA_INDEX, index)
449449
if plan.rotation:
450450
item.setTransformOriginPoint(rect.center())

src/pymmcore_widgets/views/_stack_viewer/_datastore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def frameReady(
2929
self.frame_ready.emit(event)
3030

3131
def get_frame(self, event: MDAEvent) -> np.ndarray:
32-
key = f'{POS_PREFIX}{event.index.get("p", 0)}'
32+
key = f"{POS_PREFIX}{event.index.get('p', 0)}"
3333
ary = self.position_arrays[key]
3434

3535
index = tuple(event.index.get(k) for k in self._used_axes)

tests/test_shutter_widget.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def _make_shutters(
2929
return tuple(_shutters) # type: ignore
3030

3131

32+
@pytest.mark.xfail(reason="flaky test")
3233
def test_create_shutter_widgets(qtbot: QtBot):
3334
shutter, state_dev_shutter, multi_shutter = _make_shutters(qtbot)
3435

@@ -41,6 +42,7 @@ def test_create_shutter_widgets(qtbot: QtBot):
4142
assert multi_shutter.shutter_button.isEnabled()
4243

4344

45+
@pytest.mark.xfail(reason="flaky test")
4446
def test_shutter_widget_propertyChanged(qtbot: QtBot, global_mmcore: CMMCorePlus):
4547
mmc = global_mmcore
4648
shutter, _, multi_shutter = _make_shutters(qtbot)
@@ -144,6 +146,7 @@ def test_shutter_widget_autoshutter(qtbot: QtBot, global_mmcore: CMMCorePlus):
144146
assert multi_shutter.shutter_button.isEnabled()
145147

146148

149+
@pytest.mark.xfail(reason="flaky test")
147150
def test_shutter_widget_button(qtbot: QtBot, global_mmcore: CMMCorePlus):
148151
mmc = global_mmcore
149152
shutter, state_dev_shutter, multi_shutter = _make_shutters(qtbot)
@@ -233,6 +236,7 @@ def test_shutter_widget_UserWarning(qtbot: QtBot, global_mmcore: CMMCorePlus):
233236
assert multi_shutter.shutter_button.text() == "None"
234237

235238

239+
@pytest.mark.xfail(reason="flaky test")
236240
def test_multi_shutter_state_changed(qtbot: QtBot, global_mmcore: CMMCorePlus):
237241
mmc = global_mmcore
238242
shutter, shutter1, multi_shutter = _make_shutters(qtbot)

0 commit comments

Comments
 (0)