From 4e061a85f1c6921da63ecbedb521d82cfe958af7 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Sat, 26 Nov 2022 18:26:58 -0800 Subject: [PATCH] Renamed iter back to walk --- tests/test_walk.py | 2 +- wavinfo/__main__.py | 2 +- wavinfo/wave_reader.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_walk.py b/tests/test_walk.py index 38d7aab..63df1ab 100644 --- a/tests/test_walk.py +++ b/tests/test_walk.py @@ -8,7 +8,7 @@ class TestWalk(unittest.TestCase): info = wavinfo.WavInfoReader(test_file) tested_data , tested_format = False, False - for scope, key, value in info.iter(): + for scope, key, value in info.walk(): if scope == 'fmt': if key == 'channel_count': tested_format = True diff --git a/wavinfo/__main__.py b/wavinfo/__main__.py index 4420f54..d3539c3 100644 --- a/wavinfo/__main__.py +++ b/wavinfo/__main__.py @@ -52,7 +52,7 @@ def main(): 'application': "wavinfo " + __version__, 'scopes': {} } - for scope, name, value in this_file.iter(): + for scope, name, value in this_file.walk(): if scope not in ret_dict['scopes'].keys(): ret_dict['scopes'][scope] = {} diff --git a/wavinfo/wave_reader.py b/wavinfo/wave_reader.py index cbc1fd1..9099402 100644 --- a/wavinfo/wave_reader.py +++ b/wavinfo/wave_reader.py @@ -166,10 +166,10 @@ class WavInfoReader: ixml_data = self._find_chunk_data(b'iXML', f, default_none=True) return WavIXMLFormat(ixml_data.rstrip(b'\0')) if ixml_data else None - def iter(self) -> Generator[str,str,Any]: + def walk(self) -> Generator[str,str,Any]: #FIXME: this should probably be named "iter()" """ Walk all of the available metadata fields. - + :yields: tuples of the *scope*, *key*, and *value* of each metadatum. The *scope* value will be one of "fmt", "data", "ixml", "bext", "info", "dolby", or "adm".