Skip to content

Commit e3c055a

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

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

mne_bids/tests/test_path.py

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -177,45 +177,47 @@ def test_path_benchmark(tmp_path_factory):
177177
n_derivatives = 17
178178
tmp_bids_root = tmp_path_factory.mktemp("mnebids_utils_test_bids_ds")
179179

180-
derivatives = [Path(f"derivatives", f"derivatives" + str(i)) for i in range(n_derivatives)]
180+
derivatives = [
181+
Path("derivatives", "derivatives" + str(i)) for i in range(n_derivatives)
182+
]
181183

182-
bids_subdirectories = [f"", f"sourcedata", *derivatives]
184+
bids_subdirectories = ["", "sourcedata", *derivatives]
183185

184186
# Create a BIDS compliant directory tree with high number of branches
185187
for i in range(1, n_subjects):
186188
for j in range(1, n_sessions):
187189
for subdir in bids_subdirectories:
188-
for datatype in [f"eeg", f"meg"]:
190+
for datatype in ["eeg", "meg"]:
189191
bids_subdir = BIDSPath(
190192
subject=str(i),
191193
session=str(j),
192194
datatype=datatype,
193-
task=f"audvis",
195+
task="audvis",
194196
root=str(tmp_bids_root / subdir),
195197
)
196198
bids_subdir.mkdir(exist_ok=True)
197-
Path(bids_subdir.root / f"participants.tsv").touch()
198-
Path(bids_subdir.root / f"participants.csv").touch()
199-
Path(bids_subdir.root / f"README").touch()
199+
Path(bids_subdir.root / "participants.tsv").touch()
200+
Path(bids_subdir.root / "participants.csv").touch()
201+
Path(bids_subdir.root / "README").touch()
200202

201203
# os.makedirs(bids_subdir.directory, exist_ok=True)
202204
Path(
203-
bids_subdir.directory, bids_subdir.basename + f"_events.tsv"
205+
bids_subdir.directory, bids_subdir.basename + "_events.tsv"
204206
).touch()
205207
Path(
206-
bids_subdir.directory, bids_subdir.basename + f"_events.csv"
208+
bids_subdir.directory, bids_subdir.basename + "_events.csv"
207209
).touch()
208210

209-
if datatype == f"meg":
211+
if datatype == "meg":
210212
ctf_path = Path(
211-
bids_subdir.directory, bids_subdir.basename + f"_meg.ds"
213+
bids_subdir.directory, bids_subdir.basename + "_meg.ds"
212214
)
213215
ctf_path.mkdir(exist_ok=True)
214-
Path(ctf_path, bids_subdir.basename + f".meg4").touch()
215-
Path(ctf_path, bids_subdir.basename + f".hc").touch()
216-
Path(ctf_path / f"hz.ds").mkdir(exist_ok=True)
217-
Path(ctf_path / f"hz.ds" / f"hz.meg4").touch()
218-
Path(ctf_path / f"hz.ds" / f"hz.hc").touch()
216+
Path(ctf_path, bids_subdir.basename + ".meg4").touch()
217+
Path(ctf_path, bids_subdir.basename + ".hc").touch()
218+
Path(ctf_path / "hz.ds").mkdir(exist_ok=True)
219+
Path(ctf_path / "hz.ds" / "hz.meg4").touch()
220+
Path(ctf_path / "hz.ds" / "hz.hc").touch()
219221

220222
# apply nosub on find_matching_matchs with root level bids directory should
221223
# yield a performance boost of order of length from bids_subdirectories.

0 commit comments

Comments
 (0)