diff --git a/pysvf/pysvf.pyi b/pysvf/pysvf.pyi index dafc5ee..c3227c1 100644 --- a/pysvf/pysvf.pyi +++ b/pysvf/pysvf.pyi @@ -1842,17 +1842,21 @@ class IntervalValue: def __init__(self, lb: int, ub: int) -> None: ... @overload def __init__(self, val: int) -> None: ... - def __eq__(self, other: object) -> bool: ... - def __ne__(self, other: object) -> bool: ... + # `__eq__` and `__ne__`'s type annotations are forced as `bool` for all objects, + # use `type: ignore` so that equality operators in C++ and Python are the same + @overload + def __eq__(self, other: 'IntervalValue') -> 'IntervalValue': ... # type: ignore + @overload + def __ne__(self, other: 'IntervalValue') -> 'IntervalValue': ... # type: ignore def __add__(self, other: 'IntervalValue') -> 'IntervalValue': ... def __sub__(self, other: 'IntervalValue') -> 'IntervalValue': ... def __mul__(self, other: 'IntervalValue') -> 'IntervalValue': ... def __truediv__(self, other: 'IntervalValue') -> 'IntervalValue': ... def __mod__(self, other: 'IntervalValue') -> 'IntervalValue': ... - def __lt__(self, other: 'IntervalValue') -> bool: ... - def __le__(self, other: 'IntervalValue') -> bool: ... - def __gt__(self, other: 'IntervalValue') -> bool: ... - def __ge__(self, other: 'IntervalValue') -> bool: ... + def __lt__(self, other: 'IntervalValue') -> 'IntervalValue': ... + def __le__(self, other: 'IntervalValue') -> 'IntervalValue': ... + def __gt__(self, other: 'IntervalValue') -> 'IntervalValue': ... + def __ge__(self, other: 'IntervalValue') -> 'IntervalValue': ... def __and__(self, other: "IntervalValue") -> "IntervalValue": ... def __or__(self, other: "IntervalValue") -> "IntervalValue": ... def __xor__(self, other: "IntervalValue") -> "IntervalValue": ... @@ -1920,6 +1924,12 @@ class AddressValue: class AbstractValue: + @overload + def __init__(self) -> None: ... + @overload + def __init__(self, val: IntervalValue) -> None: ... + @overload + def __init__(self, val: AddressValue) -> None: ... @overload def __init__(self, val: int) -> None: ... @overload