diff --git a/src/qtoolkit/io/base.py b/src/qtoolkit/io/base.py index a533e4b..b4ad46e 100644 --- a/src/qtoolkit/io/base.py +++ b/src/qtoolkit/io/base.py @@ -83,7 +83,7 @@ def generate_header(self, options: dict | QResources | None) -> str: keys = set(options.keys()) extra = keys.difference(template.get_identifiers()) if extra: - msg = f"The following keys are not present in the template: {', '.join(extra)}" + msg = f"The following keys are not present in the template: {', '.join(sorted(extra))}" raise ValueError(msg) unclean_header = template.safe_substitute(options)