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
Expand Up @@ -31,7 +31,7 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
rev: v0.15.4
hooks:
- id: ruff
- id: ruff-format
Expand Down
5 changes: 3 additions & 2 deletions datashuttle/utils/data_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,9 @@ def update_list_with_non_ses_sub_level_folders(
]

filt_sub_level_folders = filter(
lambda folder: folder[:4] != "ses-"
and folder not in sub_level_dtype,
lambda folder: (
folder[:4] != "ses-" and folder not in sub_level_dtype
),
sub_level_folders,
)
extra_folder_names += [
Expand Down
8 changes: 4 additions & 4 deletions tests/tests_transfers/local_filesystem/test_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ def test_deep_folder_structure(self, project):
datatyp directly. Check that rlcone is setup to transfer
multiple levels down from the datatype level.
"""
make_base_path = (
lambda root: root / "rawdata" / "sub-001" / "ses-001" / "behav"
make_base_path = lambda root: (
root / "rawdata" / "sub-001" / "ses-001" / "behav"
)
local = make_base_path(project.cfg["local_path"])
test_file_path = (
Expand Down Expand Up @@ -690,8 +690,8 @@ def monkeypatch_parse_output(top_level_folder, b):

# Run every transfer function and check that
# `TransferOutput` is returned correctly.
specific_file = (
lambda path_: f"{path_}/rawdata/{subs[0]}/{sessions[0]}/ephys/placeholder_file.txt"
specific_file = lambda path_: (
f"{path_}/rawdata/{subs[0]}/{sessions[0]}/ephys/placeholder_file.txt"
)

# All 'rawdata' functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ def test_local_filesystem_wildcards_3(
pathtable["parent_sub"]
.fillna("")
.apply(
lambda x: fnmatch.fnmatch(x, "sub-002*")
or fnmatch.fnmatch(x, "sub-003*")
lambda x: (
fnmatch.fnmatch(x, "sub-002*")
or fnmatch.fnmatch(x, "sub-003*")
)
)
]

Expand Down
6 changes: 4 additions & 2 deletions tests/tests_transfers/ssh/test_ssh_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,10 @@ def test_ssh_wildcards_3(self, ssh_setup):
pathtable["parent_sub"]
.fillna("")
.apply(
lambda x: fnmatch.fnmatch(x, "sub-002*")
or fnmatch.fnmatch(x, "sub-003*")
lambda x: (
fnmatch.fnmatch(x, "sub-002*")
or fnmatch.fnmatch(x, "sub-003*")
)
)
]

Expand Down
Loading