hdl.ast: remove Shape<>tuple comparisons.
See #691.
I missed this in commit 29502442.
This commit is contained in:
parent
f133646e9b
commit
7044e09110
4 changed files with 82 additions and 92 deletions
|
|
@ -116,15 +116,6 @@ class Shape:
|
|||
return "unsigned({})".format(self.width)
|
||||
|
||||
def __eq__(self, other):
|
||||
# TODO(nmigen-0.4): remove
|
||||
if isinstance(other, tuple) and len(other) == 2:
|
||||
width, signed = other
|
||||
if isinstance(width, int) and isinstance(signed, bool):
|
||||
return self.width == width and self.signed == signed
|
||||
else:
|
||||
raise TypeError("Shapes may be compared with other Shapes and (int, bool) tuples, "
|
||||
"not {!r}"
|
||||
.format(other))
|
||||
if not isinstance(other, Shape):
|
||||
try:
|
||||
other = self.__class__.cast(other)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue