diff --git a/pyproject.toml b/pyproject.toml index 6f4ebd5..2c443fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ ignore = [ 'SIM115', # Use a context manager for opening files 'UP031', #Use format specifiers instead of percent format 'C408', # Unnecessary `dict()` call (rewrite as a literal) - 'C417' # Unnecessary `map()` usage (rewrite using a generator expression) + # 'C417' # Unnecessary `map()` usage (rewrite using a generator expression) ] # [tool.pylint] diff --git a/src/wavinfo/wave_adm_reader.py b/src/wavinfo/wave_adm_reader.py index a37db7f..bbbaea6 100644 --- a/src/wavinfo/wave_adm_reader.py +++ b/src/wavinfo/wave_adm_reader.py @@ -207,6 +207,6 @@ class WavADMReader: return rd return dict( - channel_entries=list(map(lambda z: make_entry(z), self.channel_uids)), + channel_entries=[make_entry(z) for z in self.channel_uids], programme=self.programme(), ) diff --git a/src/wavinfo/wave_dbmd_reader.py b/src/wavinfo/wave_dbmd_reader.py index a25563f..7baac88 100644 --- a/src/wavinfo/wave_dbmd_reader.py +++ b/src/wavinfo/wave_dbmd_reader.py @@ -683,8 +683,8 @@ class WavDolbyMetadataReader: ] def to_dict(self) -> dict: - ddp = map(lambda x: asdict(x), self.dolby_digital_plus()) - atmos = map(lambda x: asdict(x), self.dolby_atmos()) + ddp = [asdict(x) for x in self.dolby_digital_plus()] + atmos = [asdict(x) for x in self.dolby_atmos()] # atmos_sup = map(lambda x: asdict(x), self.dolby_atmos_supplemental()) return dict(dolby_digital_plus=list(ddp), dolby_atmos=list(atmos))