@@ -25,7 +25,7 @@ def __init__(
2525 color : Optional [str ] = "#000000" ,
2626 ):
2727 self .child = child
28- self .child_name = child .__name__
28+ self .child_name : str = str ( child .__name__ )
2929 self ._child_id = child_id
3030 self .parent = parent
3131
@@ -93,14 +93,14 @@ def __init__(
9393 self ._tracking_function = self .funcname is not None
9494 self .max_recursion_level = max_recursion_level
9595 self ._nodenum : int = 0
96- self ._node_list = [] # a list of unique ChildNodes
97- self ._node_map = {} # map of global node index to node name
96+ self ._node_list : list [ _ChildNode ] = [] # a list of unique ChildNodes
97+ self ._node_map : dict [ int , str ] = {} # map of global node index to node name
9898 self ._override_src : OrderedDict [int , str ] = collections .OrderedDict ()
99- self ._override_src_files = {}
99+ self ._override_src_files : dict [ int , str ] = {}
100100 self ._current_node = 1 # the current global node, must start at 1
101101 self ._default_color = default_color
102102 self ._override_color = func_override_color
103- self ._graphviz_args_kwargs = {}
103+ self ._graphviz_args_kwargs : dict [ str , Any ] = {}
104104 self .similarity_container : _similarity_container_types | None = None
105105 self .similarity_results : dict [str , npt .NDArray [Any ]]
106106 self .similarity_cutoff = similarity_cutoff
@@ -314,7 +314,7 @@ def plot_similarity(
314314 ax : Optional [Axes ] = None ,
315315 colorbar : Optional [bool ] = True ,
316316 ** kwargs ,
317- ) -> tuple [dict , Axes ]:
317+ ) -> tuple [dict [ int , str ] , Axes ]:
318318 """
319319 add the similarity plot to a matplotlib axis (or create a new one)
320320
@@ -371,7 +371,7 @@ def build_interactive_graph(
371371 node_style : dict [str , Any ] | None = None ,
372372 edge_style : dict [str , Any ] | None = None ,
373373 similarity_edge_style : dict [str , Any ] | None = None ,
374- override_node_color : str | tuple | None = None ,
374+ override_node_color : str | tuple [ float , ...] | None = None ,
375375 ** kwargs ,
376376 ) -> Network :
377377 """
0 commit comments