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

Change Spotify.__eq__ #2115

Closed
wants to merge 1 commit into from
Closed

Conversation

zachsamuels
Copy link
Contributor

Makes it check both _session_id and _sync_id

Summary

Changes Spotify.eq to make it more accurate.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

Makes it check both _session_id and _sync_id
@@ -497,7 +497,7 @@ def name(self):
return 'Spotify'

def __eq__(self, other):
return isinstance(other, Spotify) and other._session_id == self._session_id
return isinstance(other, Spotify) and other._session_id == self._session_id and other._sync_id == self._sync_id
Copy link
Contributor

Choose a reason for hiding this comment

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

This line might be too long.
As I suggest in #2117, I think checking other.start == self.start is necessary as well.

@Rapptz
Copy link
Owner

Rapptz commented May 9, 2019

Superseded by #2117

@Rapptz Rapptz closed this May 9, 2019
@zachsamuels zachsamuels deleted the patch-1 branch May 9, 2019 14:29
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.

None yet

3 participants