Skip to content

Commit

Permalink
Fix circular imports
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Apr 15, 2024
1 parent ae04c02 commit 581c29d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 4 additions & 2 deletions metricflow/dataflow/builder/node_data_set.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
from __future__ import annotations

from typing import Dict, Optional, Sequence
from typing import TYPE_CHECKING, Dict, Optional, Sequence

from metricflow.dataflow.dataflow_plan import (
DataflowPlanNode,
)
from metricflow.dataset.sql_dataset import SqlDataSet
from metricflow.mf_logging.runtime import log_block_runtime
from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
from metricflow.plan_conversion.dataflow_to_sql import DataflowToSqlQueryPlanConverter
from metricflow.specs.column_assoc import ColumnAssociationResolver

if TYPE_CHECKING:
from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup


class DataflowPlanNodeOutputDataSetResolver(DataflowToSqlQueryPlanConverter):
"""Given a node in a dataflow plan, figure out what is the data set output by that node.
Expand Down
7 changes: 5 additions & 2 deletions metricflow/model/semantics/linkable_spec_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import time
from collections import defaultdict
from dataclasses import dataclass, field
from typing import Dict, FrozenSet, List, Optional, Sequence, Set, Tuple
from typing import TYPE_CHECKING, Dict, FrozenSet, List, Optional, Sequence, Set, Tuple

from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
from dbt_semantic_interfaces.protocols.dimension import Dimension, DimensionType
Expand All @@ -26,7 +26,6 @@
from metricflow.mf_logging.pretty_print import mf_pformat
from metricflow.model.semantics.linkable_element_properties import LinkableElementProperties
from metricflow.model.semantics.semantic_model_join_evaluator import SemanticModelJoinEvaluator
from metricflow.model.semantics.semantic_model_lookup import SemanticModelLookup
from metricflow.specs.specs import (
DEFAULT_TIME_GRANULARITY,
DimensionSpec,
Expand All @@ -37,6 +36,10 @@
TimeDimensionSpec,
)

if TYPE_CHECKING:
from metricflow.model.semantics.semantic_model_lookup import SemanticModelLookup


logger = logging.getLogger(__name__)


Expand Down
6 changes: 4 additions & 2 deletions metricflow/model/semantics/semantic_model_join_evaluator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from dataclasses import dataclass
from typing import Dict, List, Optional
from typing import TYPE_CHECKING, Dict, List, Optional

from dbt_semantic_interfaces.protocols.entity import EntityType
from dbt_semantic_interfaces.references import (
Expand All @@ -12,7 +12,9 @@

from metricflow.instances import EntityInstance, InstanceSet
from metricflow.mf_logging.pretty_print import mf_pformat
from metricflow.model.semantics.semantic_model_lookup import SemanticModelLookup

if TYPE_CHECKING:
from metricflow.model.semantics.semantic_model_lookup import SemanticModelLookup

MAX_JOIN_HOPS = 2

Expand Down

0 comments on commit 581c29d

Please sign in to comment.