From 7a5d0b8e676113f058411576eee08e857e17f0c2 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 2 Jan 2026 19:00:42 -0600 Subject: [PATCH] fix: tweak KeyError message for ModelBase --- src/wuttjamaican/db/util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wuttjamaican/db/util.py b/src/wuttjamaican/db/util.py index 48703ab..da4720f 100644 --- a/src/wuttjamaican/db/util.py +++ b/src/wuttjamaican/db/util.py @@ -65,7 +65,9 @@ class ModelBase: # pylint: disable=empty-docstring state = sa.inspect(self) if hasattr(state.attrs, key): return getattr(self, key) - raise KeyError(f"model instance has no attr with key: {key}") + raise KeyError( + f"{self.__class__.__name__} instance has no attr with key: {key}" + ) class UUID(