Skip to content

Commit f1de305

Browse files
committed
use dictionary comprehension to create mapping
1 parent 455c60f commit f1de305

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

waveform_editor/yaml_parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ def construct_mapping(self, node, deep=False):
1010
mapping = super().construct_mapping(node, deep)
1111

1212
# Prepend "user_" to all keys
13-
for key in list(mapping.keys()):
14-
mapping[f"user_{key}"] = mapping.pop(key)
13+
mapping = {f"user_{key}": value for key, value in mapping.items()}
1514
mapping["line_number"] = node.start_mark.line
1615

1716
return mapping

0 commit comments

Comments
 (0)