Skip to content

Commit 88cbf30

Browse files
committed
lib.wiring: use is for type comparison in Component.
This avoids running custom `__eq__` implementations, which could cause issues such as #882.
1 parent 44d5fac commit 88cbf30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

amaranth/lib/wiring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ def signature(self):
760760
for name, annot in getattr(base, "__annotations__", {}).items():
761761
if name.startswith("_"):
762762
continue
763-
if (annot in (Value, Signal, Const) or
763+
if (annot is Value or annot is Signal or annot is Const or
764764
(isinstance(annot, type) and issubclass(annot, ValueCastable)) or
765765
isinstance(annot, Signature)):
766766
if isinstance(annot, type):

0 commit comments

Comments
 (0)