diff --git a/settngs/__init__.py b/settngs/__init__.py index 581284d..929dd6c 100644 --- a/settngs/__init__.py +++ b/settngs/__init__.py @@ -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('')