Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash caused by sdg not being hashashable #166

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Conversation

kayoub5
Copy link
Collaborator

@kayoub5 kayoub5 commented Jul 27, 2023

No description provided.

@kayoub5 kayoub5 requested a review from andlaus July 27, 2023 12:15
@@ -42,8 +42,6 @@ def __hash__(self) -> int:
result += hash(self.long_name)
result += hash(self.description)
result += hash(self.is_visible_raw)
for sdg in self.sdgs:
result += hash(sdg)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andlaus hash(sdg) caused a crash due to missing __hash__ in the sdg class, fixing it will require a lot of changes

so this hotfix in order to unblock pdx loading

@andlaus
Copy link
Collaborator

andlaus commented Jul 27, 2023

looks good, merging...

@andlaus andlaus merged commit 33fdd94 into main Jul 27, 2023
6 checks passed
@andlaus
Copy link
Collaborator

andlaus commented Jul 27, 2023

BTW: what does "hashashable" mean? something involving THC? ;-P

@kayoub5
Copy link
Collaborator Author

kayoub5 commented Jul 27, 2023

BTW: what does "hashashable" mean? something involving THC? ;-P

hashable means primitive type (int, float, str) or class that impliments __hash__ function, objects that are hashable are supposed to be immutable (can be used as dict keys)

@kayoub5 kayoub5 deleted the hotfix/dop_hash branch July 27, 2023 15:40
@andlaus
Copy link
Collaborator

andlaus commented Jul 28, 2023

that's hashable, sure. but I was wondering about "hashashable" ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants