1515 UnreadPMButton , UserButton ,
1616)
1717from zulipterminal .ui_tools .utils import create_msg_box_list
18+ from zulipterminal .urwid_types import urwid_Size
1819
1920
2021class ModListWalker (urwid .SimpleFocusListWalker ):
@@ -130,7 +131,7 @@ def load_new_messages(self, anchor: int) -> None:
130131 self .model .controller .update_screen ()
131132 self .new_loading = False
132133
133- def mouse_event (self , size : Any , event : str , button : int , col : int ,
134+ def mouse_event (self , size : urwid_Size , event : str , button : int , col : int ,
134135 row : int , focus : Any ) -> Any :
135136 if event == 'mouse press' :
136137 if button == 4 :
@@ -141,7 +142,7 @@ def mouse_event(self, size: Any, event: str, button: int, col: int,
141142 return True
142143 return super ().mouse_event (size , event , button , col , row , focus )
143144
144- def keypress (self , size : Tuple [ int , int ] , key : str ) -> str :
145+ def keypress (self , size : urwid_Size , key : str ) -> str :
145146 if is_command_key ('NEXT_MESSAGE' , key ) and not self .new_loading :
146147 try :
147148 position = self .log .next_position (self .focus_position )
@@ -278,7 +279,7 @@ def update_streams(self, search_box: Any, new_text: str) -> None:
278279 self .log .extend (streams_display )
279280 self .view .controller .update_screen ()
280281
281- def mouse_event (self , size : Any , event : str , button : int , col : int ,
282+ def mouse_event (self , size : urwid_Size , event : str , button : int , col : int ,
282283 row : int , focus : Any ) -> Any :
283284 if event == 'mouse press' :
284285 if button == 4 :
@@ -289,7 +290,7 @@ def mouse_event(self, size: Any, event: str, button: int, col: int,
289290 return True
290291 return super ().mouse_event (size , event , button , col , row , focus )
291292
292- def keypress (self , size : Tuple [ int , int ] , key : str ) -> str :
293+ def keypress (self , size : urwid_Size , key : str ) -> str :
293294 if is_command_key ('SEARCH_STREAMS' , key ):
294295 self .set_focus ('header' )
295296 return key
@@ -365,7 +366,7 @@ def update_topics_list(self, stream_id: int, topic_name: str,
365366 if sender_id == self .view .model .user_id :
366367 self .list_box .set_focus (0 )
367368
368- def mouse_event (self , size : Any , event : str , button : int , col : int ,
369+ def mouse_event (self , size : urwid_Size , event : str , button : int , col : int ,
369370 row : int , focus : Any ) -> Any :
370371 if event == 'mouse press' :
371372 if button == 4 :
@@ -376,7 +377,7 @@ def mouse_event(self, size: Any, event: str, button: int, col: int,
376377 return True
377378 return super ().mouse_event (size , event , button , col , row , focus )
378379
379- def keypress (self , size : Tuple [ int , int ] , key : str ) -> str :
380+ def keypress (self , size : urwid_Size , key : str ) -> str :
380381 if is_command_key ('TOGGLE_TOPIC' , key ):
381382 # Exit topic view
382383 self .view .left_panel .contents [1 ] = (
@@ -404,7 +405,7 @@ def __init__(self, users_btn_list: List[Any]) -> None:
404405 self .log = urwid .SimpleFocusListWalker (users_btn_list )
405406 super ().__init__ (self .log )
406407
407- def mouse_event (self , size : Any , event : str , button : int , col : int ,
408+ def mouse_event (self , size : urwid_Size , event : str , button : int , col : int ,
408409 row : int , focus : Any ) -> Any :
409410 if event == 'mouse press' :
410411 if button == 4 :
@@ -460,7 +461,7 @@ def get_next_unread_pm(self) -> Optional[int]:
460461 return pm
461462 return None
462463
463- def keypress (self , size : Tuple [ int , int ] , key : str ) -> str :
464+ def keypress (self , size : urwid_Size , key : str ) -> str :
464465 if is_command_key ('GO_BACK' , key ):
465466 self .header .keypress (size , 'esc' )
466467 self .footer .keypress (size , 'esc' )
@@ -610,7 +611,7 @@ def users_view(self, users: Any=None) -> Any:
610611 self .view .user_w = user_w
611612 return user_w
612613
613- def keypress (self , size : Tuple [ int , int ] , key : str ) -> str :
614+ def keypress (self , size : urwid_Size , key : str ) -> str :
614615 if is_command_key ('SEARCH_PEOPLE' , key ):
615616 self .allow_update_user_list = False
616617 self .set_focus ('header' )
@@ -734,7 +735,7 @@ def topics_view(self, stream_button: Any) -> Any:
734735 )
735736 return w
736737
737- def keypress (self , size : Tuple [ int , int ] , key : str ) -> str :
738+ def keypress (self , size : urwid_Size , key : str ) -> str :
738739 if (is_command_key ('SEARCH_STREAMS' , key ) or
739740 is_command_key ('SEARCH_TOPICS' , key )):
740741 self .focus_position = 1
@@ -786,7 +787,7 @@ def __init__(self, controller: Any) -> None:
786787
787788 super ().__init__ (self .log )
788789
789- def keypress (self , size : Tuple [ int , int ] , key : str ) -> str :
790+ def keypress (self , size : urwid_Size , key : str ) -> str :
790791 if is_command_key ('GO_BACK' , key ) or is_command_key ('HELP' , key ):
791792 self .controller .exit_popup ()
792793 return super ().keypress (size , key )
@@ -822,7 +823,7 @@ def exit_popup_yes(self, args: Any) -> None:
822823 def exit_popup_no (self , args : Any ) -> None :
823824 self .controller .exit_popup ()
824825
825- def keypress (self , size : Tuple [ int , int ] , key : str ) -> str :
826+ def keypress (self , size : urwid_Size , key : str ) -> str :
826827 if is_command_key ('GO_BACK' , key ):
827828 self .controller .exit_popup ()
828829 return super ().keypress (size , key )
@@ -886,7 +887,7 @@ def __init__(self, controller: Any, msg: Message) -> None:
886887
887888 super ().__init__ (self .log )
888889
889- def keypress (self , size : Tuple [ int , int ] , key : str ) -> str :
890+ def keypress (self , size : urwid_Size , key : str ) -> str :
890891 if is_command_key ('GO_BACK' , key ) or is_command_key ('MSG_INFO' , key ):
891892 self .controller .exit_popup ()
892893 return super ().keypress (size , key )
0 commit comments