From b94d4d4a0f77631a47d37a9ff31d424c04d9c39b Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Wed, 16 Nov 2022 09:57:04 +0100 Subject: [PATCH] annotations: compact more redundant arch and flavours settings Signed-off-by: Andrea Righi --- kconfig/annotations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]: -- 2.31.1