Skip to content

Commit 0365e83

Browse files
committed
update core utils
1 parent 6aa15dc commit 0365e83

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/rbc/core/utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ def get_base_entities(
4242
A string-mapping of BIDS entities to values.
4343
"""
4444
file_entities = parse_bids_entities(in_file)
45-
return {
46-
k: v for k, v in file_entities.items() if k in ["sub", "ses", "task", "run"]
47-
}
45+
return {k: v for k, v in file_entities.items() if k in base_entities}
4846

4947

5048
def rename(in_file: str | Path, new_name: str | Path) -> Path:
@@ -55,7 +53,6 @@ def rename(in_file: str | Path, new_name: str | Path) -> Path:
5553
raise FileExistsError(f"Target file already exists: {new_path}")
5654
return in_file.rename(new_path)
5755

58-
5956
def save_directory(in_dir: str | Path, out_dir: str | Path, name: str) -> Path:
6057
"""Save a directory by copying it to a new location.
6158

0 commit comments

Comments
 (0)