Skip to content

Commit c1650c3

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c45981b commit c1650c3

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

mne_qt_browser/_pg_figure.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def _get_color_cached(*, color_spec, invert):
201201
color = mkColor(color_spec)
202202
except ValueError:
203203
raise ValueError(
204-
f'"{color_spec}" is not a valid matplotlib ' f"color-specifier!"
204+
f'"{color_spec}" is not a valid matplotlib color-specifier!'
205205
) from None
206206
if invert:
207207
# First see if the color is in our inversion dictionary
@@ -1703,7 +1703,7 @@ def __init__(self, mne, ch_type):
17031703
def update_value(self):
17041704
"""Update value of ScaleBarText."""
17051705
inv_norm = _get_channel_scaling(self, self.ch_type)
1706-
self.setText(f"{_simplify_float(inv_norm)} " f"{self.mne.units[self.ch_type]}")
1706+
self.setText(f"{_simplify_float(inv_norm)} {self.mne.units[self.ch_type]}")
17071707

17081708
def _set_position(self, x, y):
17091709
self.setPos(x, y)
@@ -2328,8 +2328,7 @@ def __init__(self, main, *, name):
23282328
# make title
23292329
layout.addWidget(
23302330
QLabel(
2331-
"Mark projectors applied on the plot.\n"
2332-
"(Applied projectors are dimmed)."
2331+
"Mark projectors applied on the plot.\n(Applied projectors are dimmed)."
23332332
)
23342333
)
23352334

@@ -2709,10 +2708,7 @@ def _region_changed(self):
27092708
) > 0:
27102709
dur = self.getRegion()[1] - self.getRegion()[0]
27112710
self.setRegion((self.old_onset, self.old_onset + dur))
2712-
warn(
2713-
"Can not combine channel-based annotations with "
2714-
"any other annotation."
2715-
)
2711+
warn("Can not combine channel-based annotations with any other annotation.")
27162712
return
27172713

27182714
# figure out new boundaries
@@ -3504,7 +3500,7 @@ def clean(self): # noqa: D102
35043500
if self.isRunning():
35053501
wait_time = 10 # max. waiting time in seconds
35063502
logger.info(
3507-
"Waiting for Loading-Thread to finish... " f"(max. {wait_time} sec)"
3503+
f"Waiting for Loading-Thread to finish... (max. {wait_time} sec)"
35083504
)
35093505
self.wait(int(wait_time * 1e3))
35103506
_disconnect(self.loadProgress)
@@ -4563,7 +4559,7 @@ def _mouse_moved(self, pos):
45634559
f"{_simplify_float(yvalue * inv_norm)} "
45644560
f"{self.mne.units[trace.ch_type]}"
45654561
)
4566-
self.statusBar().showMessage(f"x={x:.3f} s, " f"y={label}")
4562+
self.statusBar().showMessage(f"x={x:.3f} s, y={label}")
45674563

45684564
def _toggle_crosshair(self):
45694565
self.mne.crosshair_enabled = not self.mne.crosshair_enabled

mne_qt_browser/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ def pytest_terminal_summary(terminalreporter, exitstatus, config):
4949
for name, vals in results.items():
5050
writer.line(
5151
f"{name}:\n"
52-
f' Horizontal: {vals["h"]:6.2f}\n'
53-
f' Vertical: {vals["v"]:6.2f}'
52+
f" Horizontal: {vals['h']:6.2f}\n"
53+
f" Vertical: {vals['v']:6.2f}"
5454
)

mne_qt_browser/tests/test_pg_specific.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def test_annotations_interactions(raw_orig, pg_backend):
9797
annot_dock.start_bx.setValue(6)
9898
annot_dock.start_bx.editingFinished.emit()
9999
assert fig.msg_box.isVisible()
100-
assert fig.msg_box.informativeText() == "Start can't be bigger or " "equal to Stop!"
100+
assert fig.msg_box.informativeText() == "Start can't be bigger or equal to Stop!"
101101
fig.msg_box.close()
102102

103103
# Test that dragging annotation onto the tail of another works

0 commit comments

Comments
 (0)