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

Avoid equality check on Watcher #612

Merged
merged 1 commit into from
Mar 31, 2022
Merged

Avoid equality check on Watcher #612

merged 1 commit into from
Mar 31, 2022

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Mar 31, 2022

Since a Watcher is simply a tuple a check like watcher not in self_._watchers effectively results in an equality comparison on all the objects inside the watcher tuple, including the Parameterized instance the watcher is attached to. Not all Parameterized objects implement equality checks that make sense in this context so to avoid this we only check for identity.

@codecov-commenter
Copy link

codecov-commenter commented Mar 31, 2022

Codecov Report

Merging #612 (17874f7) into master (becf81b) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #612   +/-   ##
=======================================
  Coverage   81.79%   81.79%           
=======================================
  Files           4        4           
  Lines        3027     3027           
=======================================
  Hits         2476     2476           
  Misses        551      551           
Impacted Files Coverage Δ
param/parameterized.py 81.89% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update becf81b...17874f7. Read the comment docs.

@philippjfr philippjfr merged commit 9bce415 into master Mar 31, 2022
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.

3 participants