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] Variable: Fix cases when equal variables had different hashes #4843

Merged
merged 1 commit into from
Jun 9, 2020

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Jun 5, 2020

Issue

May fix #4766 (comment) from #4766.

Description of changes

__hash__ did not follow the same logic as __eq__. __eq__ backtracked through identities while __hash__ (kind of) made a single step.

I replaced the recursion in __eq__ with a loop. I believe the new version to be equivalent to the old one. The old one exited earlier if compute_value's matched, but with the same result as the new one.

__hash__ then uses the same pieces of data as __eq__.

Includes
  • Code changes
  • Tests

@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #4843 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4843      +/-   ##
==========================================
- Coverage   84.12%   84.10%   -0.03%     
==========================================
  Files         282      277       -5     
  Lines       57327    56498     -829     
==========================================
- Hits        48229    47520     -709     
+ Misses       9098     8978     -120     

@lanzagar lanzagar merged commit 6061f2d into biolab:master Jun 9, 2020
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.

Heatmap colour annotation not updating
3 participants