From: Andrea Righi Date: Wed, 16 Nov 2022 08:57:04 +0000 (+0100) Subject: annotations: compact more redundant arch and flavours settings X-Git-Tag: v0.1~61 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=b94d4d4a0f77631a47d37a9ff31d424c04d9c39b;p=annotations.git annotations: compact more redundant arch and flavours settings Signed-off-by: Andrea Righi --- diff --git a/kconfig/annotations.py b/kconfig/annotations.py index 490a627..92d036f 100644 --- a/kconfig/annotations.py +++ b/kconfig/annotations.py @@ -152,7 +152,7 @@ class Annotation(Config): continue arch = m.group(1) if arch not in self.config[conf]['policy']: - continue + self.config[conf]['policy'][arch] = self.config[conf]['policy'][flavour] if self.config[conf]['policy'][flavour] == self.config[conf]['policy'][arch]: del self.config[conf]['policy'][flavour] @@ -183,7 +183,7 @@ class Annotation(Config): new_val = self.config[conf] if old_val != new_val: if 'policy' in self.config[conf]: - val = self.config[conf]['policy'] + val = dict(sorted(self.config[conf]['policy'].items())) line = f"{conf : <47} policy<{val}>" tmp.write(line + "\n") if 'note' in self.config[conf]: