From 3ece8e83a1b2510c5a48bec549c43ad1b771e632 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 22 Aug 2023 14:10:40 +0300 Subject: [PATCH] Fix E721 do not compare types, for exact checks use 'is' / 'is not', for instance checks use 'isinstance()' --- src/pylast/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pylast/__init__.py b/src/pylast/__init__.py index 60f9b5f..e873964 100644 --- a/src/pylast/__init__.py +++ b/src/pylast/__init__.py @@ -1505,7 +1505,7 @@ class _Opus(_Taggable): return f"{self.get_artist().get_name()} - {self.get_title()}" def __eq__(self, other): - if type(self) != type(other): + if not isinstance(self, other): return False a = self.get_title().lower() b = other.get_title().lower()