Skip to content

Commit

Permalink
Feedback: use Sequence type
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Dec 9, 2024
1 parent 2ae5cde commit 657993f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions metricflow-semantics/metricflow_semantics/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ def with_entity_prefix(
spec=transformed_spec,
)

def with_new_defined_from(self, defined_from: Tuple[SemanticModelElementReference, ...]) -> TimeDimensionInstance:
def with_new_defined_from(self, defined_from: Sequence[SemanticModelElementReference]) -> TimeDimensionInstance:
"""Returns a new instance with the defined_from field replaced."""
return TimeDimensionInstance(
associated_columns=self.associated_columns, defined_from=defined_from, spec=self.spec
associated_columns=self.associated_columns, defined_from=tuple(defined_from), spec=self.spec
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def with_entity_prefix(self, entity_prefix: EntityReference) -> TimeDimensionSpe
)

@staticmethod
def with_base_grains(time_dimension_specs: Sequence[TimeDimensionSpec]) -> List[TimeDimensionSpec]:
def with_base_grains(time_dimension_specs: Sequence[TimeDimensionSpec]) -> Sequence[TimeDimensionSpec]:
"""Return the list of time dimension specs, replacing any custom grains with base grains.
Dedupes new specs, but preserves the initial order.
Expand Down

0 comments on commit 657993f

Please sign in to comment.