Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
args: ["--fix"]
Expand Down
16 changes: 6 additions & 10 deletions mne_qt_browser/_pg_figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def _get_color_cached(*, color_spec, invert):
color = mkColor(color_spec)
except ValueError:
raise ValueError(
f'"{color_spec}" is not a valid matplotlib ' f"color-specifier!"
f'"{color_spec}" is not a valid matplotlib color-specifier!'
) from None
if invert:
# First see if the color is in our inversion dictionary
Expand Down Expand Up @@ -1703,7 +1703,7 @@ def __init__(self, mne, ch_type):
def update_value(self):
"""Update value of ScaleBarText."""
inv_norm = _get_channel_scaling(self, self.ch_type)
self.setText(f"{_simplify_float(inv_norm)} " f"{self.mne.units[self.ch_type]}")
self.setText(f"{_simplify_float(inv_norm)} {self.mne.units[self.ch_type]}")

def _set_position(self, x, y):
self.setPos(x, y)
Expand Down Expand Up @@ -2328,8 +2328,7 @@ def __init__(self, main, *, name):
# make title
layout.addWidget(
QLabel(
"Mark projectors applied on the plot.\n"
"(Applied projectors are dimmed)."
"Mark projectors applied on the plot.\n(Applied projectors are dimmed)."
)
)

Expand Down Expand Up @@ -2709,10 +2708,7 @@ def _region_changed(self):
) > 0:
dur = self.getRegion()[1] - self.getRegion()[0]
self.setRegion((self.old_onset, self.old_onset + dur))
warn(
"Can not combine channel-based annotations with "
"any other annotation."
)
warn("Can not combine channel-based annotations with any other annotation.")
return

# figure out new boundaries
Expand Down Expand Up @@ -3504,7 +3500,7 @@ def clean(self): # noqa: D102
if self.isRunning():
wait_time = 10 # max. waiting time in seconds
logger.info(
"Waiting for Loading-Thread to finish... " f"(max. {wait_time} sec)"
f"Waiting for Loading-Thread to finish... (max. {wait_time} sec)"
)
self.wait(int(wait_time * 1e3))
_disconnect(self.loadProgress)
Expand Down Expand Up @@ -4563,7 +4559,7 @@ def _mouse_moved(self, pos):
f"{_simplify_float(yvalue * inv_norm)} "
f"{self.mne.units[trace.ch_type]}"
)
self.statusBar().showMessage(f"x={x:.3f} s, " f"y={label}")
self.statusBar().showMessage(f"x={x:.3f} s, y={label}")

def _toggle_crosshair(self):
self.mne.crosshair_enabled = not self.mne.crosshair_enabled
Expand Down
4 changes: 2 additions & 2 deletions mne_qt_browser/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ def pytest_terminal_summary(terminalreporter, exitstatus, config):
for name, vals in results.items():
writer.line(
f"{name}:\n"
f' Horizontal: {vals["h"]:6.2f}\n'
f' Vertical: {vals["v"]:6.2f}'
f" Horizontal: {vals['h']:6.2f}\n"
f" Vertical: {vals['v']:6.2f}"
)
2 changes: 1 addition & 1 deletion mne_qt_browser/tests/test_pg_specific.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_annotations_interactions(raw_orig, pg_backend):
annot_dock.start_bx.setValue(6)
annot_dock.start_bx.editingFinished.emit()
assert fig.msg_box.isVisible()
assert fig.msg_box.informativeText() == "Start can't be bigger or " "equal to Stop!"
assert fig.msg_box.informativeText() == "Start can't be bigger or equal to Stop!"
fig.msg_box.close()

# Test that dragging annotation onto the tail of another works
Expand Down
Loading