Skip to content

Commit 4fbc698

Browse files
committed
use isinstance check
1 parent 3076a77 commit 4fbc698

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/bytecode/instr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,9 +927,9 @@ def __repr__(self) -> str:
927927
return "<%s location=%s>" % (self._name, self._location)
928928

929929
def __eq__(self, other: object) -> bool:
930-
if type(self) is not type(other):
930+
if not isinstance(other, BaseInstr):
931931
return False
932-
return self._cmp_key() == other._cmp_key() # type: ignore[union-attr]
932+
return self._cmp_key() == other._cmp_key()
933933

934934
# --- Private API
935935

0 commit comments

Comments
 (0)