Skip to content

Commit

Permalink
Remove inline comment clutter from LinkableElementSet
Browse files Browse the repository at this point in the history
There are some comments that are a bit outdated and confusing,
or at the very least not terribly useful, in the first sections of
the LinkableElementSet, so we remove them. This was found in a
modification to the LinkableDimension class, as the longer comment
makes a reference to it.
  • Loading branch information
tlento committed Apr 23, 2024
1 parent 8164aaf commit 8ffb5f0
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions metricflow/model/semantics/linkable_element_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ class LinkableElementSet:
TODO: There are similarities with LinkableSpecSet - consider consolidation.
"""

# Dictionaries that map the path key to context on the dimension
#
# For example:
# {
# "listing__country_latest": (
# LinkableDimension(
# element_name="country_latest",
# entity_links=("listing",),
# semantic_model_origin="listings_latest_source",
# )
# }
path_key_to_linkable_dimensions: Dict[ElementPathKey, Tuple[LinkableDimension, ...]] = field(default_factory=dict)
path_key_to_linkable_entities: Dict[ElementPathKey, Tuple[LinkableEntity, ...]] = field(default_factory=dict)
path_key_to_linkable_metrics: Dict[ElementPathKey, Tuple[LinkableMetric, ...]] = field(default_factory=dict)
Expand All @@ -54,7 +43,6 @@ def merge_by_path_key(linkable_element_sets: Sequence[LinkableElementSet]) -> Li
for path_key, linkable_metrics in linkable_element_set.path_key_to_linkable_metrics.items():
key_to_linkable_metrics[path_key].extend(linkable_metrics)

# Convert the dictionaries to use tuples instead of lists.
return LinkableElementSet(
path_key_to_linkable_dimensions={
path_key: tuple(dimensions) for path_key, dimensions in key_to_linkable_dimensions.items()
Expand Down

0 comments on commit 8ffb5f0

Please sign in to comment.