diff --git a/CHANGES b/CHANGES index 88d130341..d29d70467 100644 --- a/CHANGES +++ b/CHANGES @@ -14,6 +14,11 @@ $ pip install --user --upgrade --pre libtmux +### Improvement + +- `Window.__eq__` now returns `False` instead of raising `AssertionError`, thank + you @m1guelperez! (#505) + ## libtmux 0.24.1 (2023-11-23) ### Packaging diff --git a/src/libtmux/window.py b/src/libtmux/window.py index dd1c49706..d52b00f2a 100644 --- a/src/libtmux/window.py +++ b/src/libtmux/window.py @@ -552,8 +552,9 @@ def attached_pane(self) -> t.Optional["Pane"]: # Dunder # def __eq__(self, other: object) -> bool: - assert isinstance(other, Window) - return self.window_id == other.window_id + if isinstance(other, Window): + return self.window_id == other.window_id + return False def __repr__(self) -> str: return "{}({} {}:{}, {})".format(