lib.wiring: use is
for type comparison in Component
.
This avoids running custom `__eq__` implementations, which could cause issues such as #882.
This commit is contained in:
parent
44d5fac01c
commit
88cbf30128
|
@ -760,7 +760,7 @@ class Component(Elaboratable):
|
||||||
for name, annot in getattr(base, "__annotations__", {}).items():
|
for name, annot in getattr(base, "__annotations__", {}).items():
|
||||||
if name.startswith("_"):
|
if name.startswith("_"):
|
||||||
continue
|
continue
|
||||||
if (annot in (Value, Signal, Const) or
|
if (annot is Value or annot is Signal or annot is Const or
|
||||||
(isinstance(annot, type) and issubclass(annot, ValueCastable)) or
|
(isinstance(annot, type) and issubclass(annot, ValueCastable)) or
|
||||||
isinstance(annot, Signature)):
|
isinstance(annot, Signature)):
|
||||||
if isinstance(annot, type):
|
if isinstance(annot, type):
|
||||||
|
|
Loading…
Reference in a new issue