Skip to content

Commit c929e51

Browse files
authored
Merge pull request #3217 from alejoe91/fix-element-is-path
Fix bug in extractor_dict_iterator if element is not str/Path
2 parents 4947385 + c8efc26 commit c929e51

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/spikeinterface/core/core_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def recursive_path_modifier(d, func, target="path", copy=True) -> dict:
329329

330330
# This is the current definition that an element in a extractor_dict is a path
331331
# This is shared across a couple of definition so it is here for DNRY
332-
element_is_path = lambda element: "path" in element.name and isinstance(element.value, (str, Path))
332+
element_is_path = lambda element: isinstance(element.value, (str, Path)) and "path" in element.name
333333

334334

335335
def _get_paths_list(d: dict) -> list[str | Path]:

0 commit comments

Comments
 (0)