Use assignment expressions 29 (#58713)
This commit is contained in:
parent
887d04be60
commit
b1d49b3b66
15 changed files with 27 additions and 62 deletions
|
@ -22,8 +22,7 @@ def normalize_metadata(metadata: dict) -> dict:
|
|||
"""Normalize object metadata by stripping the prefix."""
|
||||
new_metadata = {}
|
||||
for meta_key, meta_value in metadata.items():
|
||||
match = _METADATA_RE.match(meta_key)
|
||||
if not match:
|
||||
if not (match := _METADATA_RE.match(meta_key)):
|
||||
continue
|
||||
|
||||
new_metadata[match.group(1).lower()] = meta_value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue