Clarify duplicate yaml key ValueError message

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
gtsiam 2024-09-17 23:06:41 +03:00 committed by GitHub
parent 6e05fbdb87
commit f2b4fb8e57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -110,7 +110,7 @@ class NoDuplicateKeysLoader(yaml.loader.SafeLoader):
assert len(duplicate_keys) > 0
raise ValueError(
"Key redefinitions are not allowed: " + ", ".join(duplicate_keys)
f"Config field duplicates are not allowed, the following fields are duplicated in the config: {', '.join(duplicate_keys)}"
)
return mapping