Apply suggestions from code review
This commit is contained in:
parent
c8fb4197ab
commit
ba626c2144
|
@ -222,7 +222,7 @@ def _compare_eq_any(left: Any, right: Any, verbose: int = 0) -> List[str]:
|
||||||
other_side = right if isinstance(left, ApproxBase) else left
|
other_side = right if isinstance(left, ApproxBase) else left
|
||||||
|
|
||||||
explanation = approx_side._repr_compare(other_side)
|
explanation = approx_side._repr_compare(other_side)
|
||||||
elif type(left) is type(right)
|
elif type(left) is type(right) and (
|
||||||
isdatacls(left) or isattrs(left) or isnamedtuple(left)
|
isdatacls(left) or isattrs(left) or isnamedtuple(left)
|
||||||
):
|
):
|
||||||
# Note: unlike dataclasses/attrs, namedtuples compare only the
|
# Note: unlike dataclasses/attrs, namedtuples compare only the
|
||||||
|
|
Loading…
Reference in New Issue