11import datetime
2- from typing import TYPE_CHECKING , Optional , Tuple , Union
2+ from typing import TYPE_CHECKING , Optional , Union
33
44if TYPE_CHECKING :
55 from shapash .explainer .smart_explainer import SmartExplainer
@@ -335,7 +335,7 @@ def get_feature_contributions_sign_to_show(positive: list, negative: list) -> Op
335335 return sign
336336
337337
338- def update_features_to_display (features : int , nb_columns : int , value : int ) -> Tuple [int , int , dict ]:
338+ def update_features_to_display (features : int , nb_columns : int , value : int ) -> tuple [int , int , dict ]:
339339 """Update features to display slider.
340340
341341 Parameters
@@ -349,7 +349,7 @@ def update_features_to_display(features: int, nb_columns: int, value: int) -> Tu
349349
350350 Returns
351351 -------
352- Tuple [int, int, dict]
352+ tuple [int, int, dict]
353353 Number of columns to plot, Number max of columns to plot, Marks in the slider
354354 """
355355 max_value = min (features , nb_columns )
@@ -696,7 +696,7 @@ def create_filter_modalities_selection(value: str, id: dict, round_dataframe: pd
696696 return new_element
697697
698698
699- def handle_page_navigation (triggered_input : str , page : Union [int , str ], selected_feature : str ) -> Tuple [int , str ]:
699+ def handle_page_navigation (triggered_input : str , page : Union [int , str ], selected_feature : str ) -> tuple [int , str ]:
700700 """
701701 Handle the navigation between different pages based on user input.
702702
@@ -706,7 +706,7 @@ def handle_page_navigation(triggered_input: str, page: Union[int, str], selected
706706 selected_feature (str): The currently selected feature.
707707
708708 Returns:
709- Tuple [int, str]: Updated page number and selected feature.
709+ tuple [int, str]: Updated page number and selected feature.
710710 """
711711 page = int (page )
712712 if triggered_input == "page_left.n_clicks" :
@@ -765,7 +765,7 @@ def handle_group_display_logic(
765765 selected_click_data_store ,
766766 features_groups : dict ,
767767 features_dict : dict ,
768- ) -> Tuple [str , str , dict ]:
768+ ) -> tuple [str , str , dict ]:
769769 """
770770 Handle the display logic for feature groups.
771771
@@ -779,7 +779,7 @@ def handle_group_display_logic(
779779 features_dict (dict): Dictionary of features.
780780
781781 Returns:
782- Tuple [str, str, dict]: Updated selected feature, group name, and click data.
782+ tuple [str, str, dict]: Updated selected feature, group name, and click data.
783783 """
784784 group_name = None
785785 selected_feature_group = None
@@ -818,7 +818,7 @@ def handle_group_display_logic(
818818
819819def determine_total_pages_and_display (
820820 explainer : "SmartExplainer" , features : int , bool_group : bool , group_name : str , page : int
821- ) -> Tuple [int , str , int ]:
821+ ) -> tuple [int , str , int ]:
822822 """
823823 Determine the total number of pages and the display properties.
824824
@@ -830,7 +830,7 @@ def determine_total_pages_and_display(
830830 page (int): Current page number.
831831
832832 Returns:
833- Tuple [int, str, int]: Total pages, display properties, and updated page number.
833+ tuple [int, str, int]: Total pages, display properties, and updated page number.
834834 """
835835 display_groups = explainer .features_groups is not None and bool_group
836836 if explainer ._case == "classification" :
0 commit comments