1 Commits
0.9.1 ... 0.9.2

Author SHA1 Message Date
d30e73a679 Do not add duplicate settings when generating a namespace 2023-12-17 18:26:57 -08:00

View File

@ -324,7 +324,9 @@ def generate_ns(definitions: Definitions) -> str:
if type_name == 'Any':
type_name = 'typing.Any'
attributes.append(f' {setting.internal_name}: {type_name}')
attribute = f' {setting.internal_name}: {type_name}'
if attribute not in attributes:
attributes.append(attribute)
# Add a blank line between groups
if attributes and attributes[-1] != '':
attributes.append('')