From 7c7c0c658c6e6dea3a4d11060347af990046d1a1 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Fri, 30 Jan 2026 10:58:54 -0700 Subject: [PATCH 1/2] Do not strip lsst prefix from file names when reporting them pex_config is used outside of lsst code base and it is now more confusing than not for the lsst to disappear. --- python/lsst/pex/config/callStack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/lsst/pex/config/callStack.py b/python/lsst/pex/config/callStack.py index 218ae0f..cd1a91e 100644 --- a/python/lsst/pex/config/callStack.py +++ b/python/lsst/pex/config/callStack.py @@ -102,7 +102,7 @@ class StackFrame: getStackFrame """ - _STRIP = "/python/lsst/" + _STRIP = "/python/" """String to strip from the ``filename`` in the constructor.""" def __init__(self, filename, lineno, function, content=None): From 66c62151a3aeb3a27e9215fa8d45e765692125e5 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Fri, 30 Jan 2026 10:59:49 -0700 Subject: [PATCH 2/2] Add the config class name to the error message Sometimes (for PipelineTastConfig) you get told the error is in the generic metaclass so knowing the actual config class name helps. --- python/lsst/pex/config/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/lsst/pex/config/config.py b/python/lsst/pex/config/config.py index 26d07e9..4a8e740 100644 --- a/python/lsst/pex/config/config.py +++ b/python/lsst/pex/config/config.py @@ -321,7 +321,7 @@ def __init__(self, field, config, msg): error = ( f"{self.fieldType.__name__} '{self.fullname}' failed validation: {msg}\n" f"For more information see the Field definition at:\n{self.fieldSource.format()}" - f" and the Config definition at:\n{self.configSource.format()}" + f" and the Config definition for {_typeStr(config)} at:\n{self.configSource.format()}" ) super().__init__(error)