Skip to content

Commit 2cc7199

Browse files
committed
@Alejo91 suggestion
1 parent e1f5230 commit 2cc7199

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/spikeinterface/core/core_tools.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ def is_dict_extractor(d: dict) -> bool:
184184
return is_extractor
185185

186186

187-
recording_dict_element = namedtuple(typename="recording_dict_element", field_names=["value", "name", "access_path"])
187+
extractor_dict_element = namedtuple(typename="extractor_dict_element", field_names=["value", "name", "access_path"])
188188

189189

190-
def extractor_dict_iterator(extractor_dict: dict) -> Generator[recording_dict_element]:
190+
def extractor_dict_iterator(extractor_dict: dict) -> Generator[extractor_dict_element]:
191191
"""
192192
Iterator for recursive traversal of a dictionary.
193193
This function explores the dictionary recursively and yields the path to each value along with the value itself.
@@ -204,7 +204,7 @@ def extractor_dict_iterator(extractor_dict: dict) -> Generator[recording_dict_el
204204
205205
Yields
206206
------
207-
recording_dict_element
207+
extractor_dict_element
208208
Named tuple containing the value, the name, and the access_path to the value in the dictionary.
209209
210210
"""
@@ -219,7 +219,7 @@ def _extractor_dict_iterator(dict_list_or_value, access_path=(), name=""):
219219
v, access_path + (i,), name=name
220220
) # Propagate name of list to children
221221
else:
222-
yield recording_dict_element(
222+
yield extractor_dict_element(
223223
value=dict_list_or_value,
224224
name=name,
225225
access_path=access_path,
@@ -320,7 +320,7 @@ def recursive_path_modifier(d, func, target="path", copy=True) -> dict:
320320
raise ValueError(f"{k} key for path must be str or list[str]")
321321

322322

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

0 commit comments

Comments
 (0)