Skip to content

Commit

Permalink
Fix some cases where multi-line strings should be single
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Jan 29, 2025
1 parent 25ab575 commit 7ddf988
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions python/lsst/daf/butler/_limited_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ def getURI(

if primary is None or components:
raise RuntimeError(
f"Dataset ({ref}) includes distinct URIs for components. "
"Use LimitedButler.getURIs() instead."
f"Dataset ({ref}) includes distinct URIs for components. Use LimitedButler.getURIs() instead."
)
return primary

Expand Down
3 changes: 1 addition & 2 deletions python/lsst/daf/butler/registry/interfaces/_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -1217,8 +1217,7 @@ def _make_temporary_table(
)
if table.key in self._temp_tables and table.key != name:
raise ValueError(
f"A temporary table with name {name} (transformed to {table.key} by "
"Database) already exists."
f"A temporary table with name {name} (transformed to {table.key} by Database) already exists."
)
with self._transaction():
table.create(connection)
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/registry/tests/_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3350,7 +3350,7 @@ def do_query(dimensions=("visit", "tract"), datasets=None, collections=None):

with self.assertRaisesRegex(
(ValueError, InvalidQueryError),
"(Field 'name' does not exist in 'tract')" "|(Unrecognized field 'name' for tract.)",
"(Field 'name' does not exist in 'tract')|(Unrecognized field 'name' for tract.)",
):
list(do_query("tract").order_by("tract.name"))

Expand Down
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/remote_butler/_query_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def _convert_general_result(spec: GeneralResultSpec, model: GeneralResultModel)
# is True, but it will be None if remote server was not upgraded.
if model.dimension_records is None:
raise ValueError(
"Missing dimension records in general result -- " "it is likely that server needs an upgrade."
"Missing dimension records in general result -- it is likely that server needs an upgrade."
)

columns = spec.get_result_columns()
Expand Down

0 comments on commit 7ddf988

Please sign in to comment.