Skip to content

Commit

Permalink
Merge pull request #449 from lsst/tickets/DM-46599
Browse files Browse the repository at this point in the history
DM-46599: Stop using deprecated property butler.collections
  • Loading branch information
dhirving authored Oct 16, 2024
2 parents b29a44f + 1c38fe9 commit d975a85
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/lsst/pipe/base/quantum_graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def __init__(
self._pipeline_graph = pipeline_graph
self.butler = butler
if input_collections is None:
input_collections = butler.collections
input_collections = butler.collections.defaults
if not input_collections:
raise ValueError("No input collections provided.")
self.input_collections = input_collections
Expand Down
6 changes: 3 additions & 3 deletions python/lsst/pipe/base/tests/mocks/_storage_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,21 @@ def get_original_name(mock: str) -> str:
return mock.removeprefix(_NAME_PREFIX)


def is_mock_name(name: str) -> bool:
def is_mock_name(name: str | None) -> bool:
"""Return whether the given name is that of a mock storage class, dataset
type, or task label.
Parameters
----------
name : `str`
name : `str` or `None`
The given name to check.
Returns
-------
is_mock : `bool`
Whether the name is for a mock or not.
"""
return name.startswith(_NAME_PREFIX)
return name is not None and name.startswith(_NAME_PREFIX)


# Tests for this module are in the ci_middleware package, where we have easy
Expand Down
4 changes: 2 additions & 2 deletions python/lsst/pipe/base/tests/simpleQGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def makeSimpleQGraph(
"Instantiating QuantumGraphBuilder, "
"skip_existing_in=%s, input_collections=%r, output_run=%r, where=%r, bind=%s.",
skipExistingIn,
butler.collections,
butler.collections.defaults,
run,
userQuery,
bind,
Expand All @@ -500,7 +500,7 @@ def makeSimpleQGraph(
pipeline_graph,
butler,
skip_existing_in=skipExistingIn if skipExistingIn is not None else [],
input_collections=butler.collections if butler.collections is not None else [run],
input_collections=butler.collections.defaults,
output_run=run,
where=userQuery,
bind=bind,
Expand Down

0 comments on commit d975a85

Please sign in to comment.