From c3b43a444c9cba070a7d05b66bc2313885616e29 Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Wed, 27 Mar 2024 23:14:27 -0400 Subject: [PATCH] Fix incorrect query-result type imports. This test wanted the result objects from lsst.daf.butler.registry.queries for use in annotations, but it was getting them from lsst.daf.butler.queries and we didn't notice because we don't run MyPy on tests. --- tests/test_query_relations.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_query_relations.py b/tests/test_query_relations.py index 32fa894ec1..2521ef01de 100644 --- a/tests/test_query_relations.py +++ b/tests/test_query_relations.py @@ -31,8 +31,12 @@ import re import unittest -from lsst.daf.butler import DataCoordinateQueryResults, DatasetRefQueryResults, DimensionRecordQueryResults from lsst.daf.butler.registry import MissingSpatialOverlapError, RegistryConfig, _RegistryFactory +from lsst.daf.butler.registry.queries import ( + DataCoordinateQueryResults, + DatasetQueryResults, + DimensionRecordQueryResults, +) from lsst.daf.butler.transfers import YamlRepoImportBackend TESTDIR = os.path.abspath(os.path.dirname(__file__)) @@ -99,7 +103,7 @@ def setUpClass(cls) -> None: def assert_relation_str( self, expected: str, - *results: DataCoordinateQueryResults | DimensionRecordQueryResults | DatasetRefQueryResults, + *results: DataCoordinateQueryResults | DimensionRecordQueryResults | DatasetQueryResults, ) -> None: """Assert that checks that one or more registry queries have relation trees that match the given string.