From 3d502c8fc83dd2f3c56ea737c4daf7effad3d24a Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Thu, 1 Jun 2023 14:33:51 +0200 Subject: [PATCH] _parse_attributes(): move prefix declaration near where it is used --- picard/mbjson.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/picard/mbjson.py b/picard/mbjson.py index 8b815211b..e263b0e44 100644 --- a/picard/mbjson.py +++ b/picard/mbjson.py @@ -128,13 +128,13 @@ def _parse_attributes(attrs, reltype, attr_credits): prefixes.append(attr) else: nouns.append(attr) - prefix = " ".join(prefixes) if len(nouns) > 1: result = "%s and %s" % (", ".join(nouns[:-1]), nouns[-1:][0]) elif len(nouns) == 1: result = nouns[0] else: result = _BLANK_SPECIAL_RELTYPES.get(reltype, "") + prefix = " ".join(prefixes) return " ".join([prefix, result]).strip()