@@ -118,7 +118,7 @@ def get_code_optimization_context(
118118
119119 # Get FunctionSource representation of helpers of FTO
120120 fto_input = {function_to_optimize .file_path : {function_to_optimize .qualified_name }}
121- jedi_refs_cache : dict [Path , dict [str , list ]] | None = None
121+ jedi_refs_cache : dict [Path , dict [str , list [ Name ] ]] | None = None
122122 if call_graph is not None :
123123 helpers_of_fto_dict , helpers_of_fto_list = call_graph .get_callees (fto_input )
124124 else :
@@ -561,14 +561,14 @@ def get_function_sources_from_jedi(
561561 project_root_path : Path ,
562562 * ,
563563 jedi_project : object | None = None ,
564- refs_cache : dict [Path , dict [str , list ]] | None = None ,
565- ) -> tuple [dict [Path , set [FunctionSource ]], list [FunctionSource ], dict [Path , dict [str , list ]]]:
564+ refs_cache : dict [Path , dict [str , list [ Name ] ]] | None = None ,
565+ ) -> tuple [dict [Path , set [FunctionSource ]], list [FunctionSource ], dict [Path , dict [str , list [ Name ] ]]]:
566566 import jedi
567567
568568 project = jedi_project if jedi_project is not None else get_jedi_project (str (project_root_path ))
569569 file_path_to_function_source = defaultdict (set )
570570 function_source_list : list [FunctionSource ] = []
571- new_refs_cache : dict [Path , dict [str , list ]] = {} if refs_cache is None else dict (refs_cache )
571+ new_refs_cache : dict [Path , dict [str , list [ Name ] ]] = {} if refs_cache is None else dict (refs_cache )
572572 for file_path , qualified_function_names in file_path_to_qualified_function_names .items ():
573573 if file_path in new_refs_cache :
574574 refs_by_parent = new_refs_cache [file_path ]
@@ -577,7 +577,7 @@ def get_function_sources_from_jedi(
577577 file_refs = script .get_names (all_scopes = True , definitions = False , references = True )
578578
579579 # Pre-group references by their parent function's qualified name for O(1) lookup
580- refs_by_parent : dict [ str , list [ Name ]] = defaultdict (list )
580+ refs_by_parent = defaultdict (list )
581581 for ref in file_refs :
582582 if not ref .full_name :
583583 continue
0 commit comments