diff --git a/dbt_semantic_interfaces/protocols/saved_query.py b/dbt_semantic_interfaces/protocols/saved_query.py index 4a6021cb..f27eb0df 100644 --- a/dbt_semantic_interfaces/protocols/saved_query.py +++ b/dbt_semantic_interfaces/protocols/saved_query.py @@ -1,5 +1,5 @@ from abc import abstractmethod -from typing import List, Optional, Protocol, Sequence +from typing import Optional, Protocol, Sequence from dbt_semantic_interfaces.protocols.export import Export from dbt_semantic_interfaces.protocols.metadata import Metadata @@ -48,6 +48,6 @@ def label(self) -> Optional[str]: @property @abstractmethod - def exports(self) -> Optional[List[Export]]: + def exports(self) -> Optional[Sequence[Export]]: """Exports that can run using this saved query.""" pass diff --git a/tests/parsing/test_saved_query_parsing.py b/tests/parsing/test_saved_query_parsing.py index 38a67fab..4cd97e15 100644 --- a/tests/parsing/test_saved_query_parsing.py +++ b/tests/parsing/test_saved_query_parsing.py @@ -164,7 +164,7 @@ def test_saved_query_exports() -> None: assert len(build_result.semantic_manifest.saved_queries) == 1 saved_query = build_result.semantic_manifest.saved_queries[0] - assert len(saved_query.exports) == 2 + assert saved_query.exports and len(saved_query.exports) == 2 names_to_exports = {export.name: export for export in saved_query.exports} assert set(names_to_exports.keys()) == {"test_exports1", "test_exports2"}