File tree 3 files changed +21
-0
lines changed
3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -344,5 +344,12 @@ def reset(self) -> "Pane":
344
344
self .cmd ("send-keys" , r"-R \; clear-history" )
345
345
return self
346
346
347
+ #
348
+ # Dunder
349
+ #
350
+ def __eq__ (self , other : object ) -> bool :
351
+ assert isinstance (other , Pane )
352
+ return self .pane_id == other .pane_id
353
+
347
354
def __repr__ (self ) -> str :
348
355
return "{}({} {})" .format (self .__class__ .__name__ , self .pane_id , self .window )
Original file line number Diff line number Diff line change @@ -551,5 +551,12 @@ def list_windows(self) -> t.List["Window"]:
551
551
#: Was used by TmuxRelationalObject (but that's longer used in this class)
552
552
children = windows
553
553
554
+ #
555
+ # Dunder
556
+ #
557
+ def __eq__ (self , other : object ) -> bool :
558
+ assert isinstance (other , Session )
559
+ return self .session_id == other .session_id
560
+
554
561
def __repr__ (self ) -> str :
555
562
return f"{ self .__class__ .__name__ } ({ self .session_id } { self .session_name } )"
Original file line number Diff line number Diff line change @@ -550,6 +550,13 @@ def list_panes(self) -> t.List["Pane"]:
550
550
#: TmuxRelationalOjbect anymore
551
551
children = panes
552
552
553
+ #
554
+ # Dunder
555
+ #
556
+ def __eq__ (self , other : object ) -> bool :
557
+ assert isinstance (other , Window )
558
+ return self .window_id == other .window_id
559
+
553
560
def __repr__ (self ) -> str :
554
561
return "{}({} {}:{}, {})" .format (
555
562
self .__class__ .__name__ ,
You can’t perform that action at this time.
0 commit comments