Ruff: Fixed C408

This commit is contained in:
2026-09-17 14:00:33 -07:00
parent 90d15c78c0
commit 0060212083
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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]
+1 -1
View File
@@ -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(),
)
+2 -2
View File
@@ -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))