Skip to content

Commit

Permalink
fix hashability of frozen Resource dataclass (use FrozenSet instead o…
Browse files Browse the repository at this point in the history
…f Set)
  • Loading branch information
Masterchen09 committed Aug 13, 2024
1 parent 1347cd6 commit 5d7b4fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion metadata-ingestion/src/datahub/ingestion/source/sac/sac.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ def get_resources(self) -> Iterable[Resource]:
open_url=entity.openURL,
ancestor_path=ancestor_path,
is_mobile=entity.isMobile,
resource_models=resource_models,
resource_models=frozenset(resource_models),
)

def get_import_data_model_ids(self) -> Set[str]:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dataclasses import dataclass
from datetime import datetime
from typing import Optional, Set
from typing import FrozenSet, Optional


@dataclass(frozen=True)
Expand Down Expand Up @@ -30,7 +30,7 @@ class Resource:
open_url: str
ancestor_path: Optional[str]
is_mobile: bool
resource_models: Set[ResourceModel]
resource_models: FrozenSet[ResourceModel]


@dataclass(frozen=True)
Expand Down

0 comments on commit 5d7b4fb

Please sign in to comment.