From 4b17df3e7a944cc2ede931f2635eb7c1ed0df5e6 Mon Sep 17 00:00:00 2001 From: Jeremy Kubica <104161096+jeremykubica@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:17:10 -0400 Subject: [PATCH] Fix duplicate parameter error message --- src/tdastro/base_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tdastro/base_models.py b/src/tdastro/base_models.py index a9e51407..fac27687 100644 --- a/src/tdastro/base_models.py +++ b/src/tdastro/base_models.py @@ -71,7 +71,7 @@ def add_parameter(self, name, value=None, required=False, **kwargs): Raise a ``ValueError`` if the parameter is required, but set to None. """ if hasattr(self, name) and getattr(self, name) is not None: - raise KeyError(f"Duplicate parameter set: {KeyError}") + raise KeyError(f"Duplicate parameter set: {name}") if value is None and name in kwargs: # The value wasn't set, but the name is in kwargs.