@@ -3368,17 +3368,17 @@ def get_all_available_screen_fields(self, screen_id: T_id) -> T_resp_json:
33683368 url = f"{ base_url } /{ screen_id } /availableFields"
33693369 return self .get (url )
33703370
3371- def get_screen_tabs (self , screen_id : T_id ) -> list :
3371+ def get_screen_tabs (self , screen_id : T_id ) -> Optional [ list ] :
33723372 """
33733373 Get tabs for the screen id
33743374 :param screen_id:
33753375 :return:
33763376 """
33773377 base_url = self .resource_url ("screens" )
33783378 url = f"{ base_url } /{ screen_id } /tabs"
3379- return self .get (url )
3379+ return self .get (url ) # type: ignore[return-value]
33803380
3381- def get_screen_tab_fields (self , screen_id : T_id , tab_id : T_id ) -> list :
3381+ def get_screen_tab_fields (self , screen_id : T_id , tab_id : T_id ) -> Optional [ list ] :
33823382 """
33833383 Get fields by the tab id and the screen id
33843384 :param tab_id:
@@ -3387,20 +3387,20 @@ def get_screen_tab_fields(self, screen_id: T_id, tab_id: T_id) -> list:
33873387 """
33883388 base_url = self .resource_url ("screens" )
33893389 url = f"{ base_url } /{ screen_id } /tabs/{ tab_id } /fields"
3390- return self .get (url )
3390+ return self .get (url ) # type: ignore[return-value]
33913391
33923392 def get_all_screen_fields (self , screen_id : T_id ) -> list :
33933393 """
33943394 Get all fields by screen id
33953395 :param screen_id:
33963396 :return:
33973397 """
3398- screen_tabs = self .get_screen_tabs (screen_id )
3398+ screen_tabs = self .get_screen_tabs (screen_id ) or []
33993399 fields : list = []
34003400 for screen_tab in screen_tabs :
34013401 tab_id = screen_tab ["id" ]
34023402 if tab_id :
3403- tab_fields = self .get_screen_tab_fields (screen_id = screen_id , tab_id = tab_id )
3403+ tab_fields = self .get_screen_tab_fields (screen_id = screen_id , tab_id = tab_id ) or []
34043404 fields = fields + tab_fields
34053405 return fields
34063406
0 commit comments