Skip to content

Commit

Permalink
Use config class name in generated connections config class name.
Browse files Browse the repository at this point in the history
This vastly improves the AttributeError message when using the wrong
name for a connection - without it there's no way to determine which
task had the problem.
  • Loading branch information
TallJimbo committed Jan 13, 2023
1 parent 27db031 commit a75e2bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/pipe/base/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def __new__(
configConnectionsNamespace["ConnectionsClass"] = connectionsClass

# Create a new config class with the fields defined above
Connections = type("Connections", (pexConfig.Config,), configConnectionsNamespace)
Connections = type(f"{name}Connections", (pexConfig.Config,), configConnectionsNamespace)
# add it to the Config class that is currently being declared
dct["connections"] = pexConfig.ConfigField(
dtype=Connections,
Expand Down

0 comments on commit a75e2bf

Please sign in to comment.