1414MTLS_CA_PATH = None
1515LAST_GENERATE_CONTEXTS = None
1616LAST_GENERATE_NAMES = None
17- LAST_GENERATE_FUNCTION_IDS = None
17+ LAST_GENERATE_IDS = None
1818LAST_GENERATE_NO_TYPES = None
1919
2020
@@ -61,13 +61,13 @@ def get_api_key_and_url() -> Tuple[str | None, str | None]:
6161 MTLS_CA_PATH = config .get ("polyapi" , "mtls_ca_path" , fallback = None )
6262
6363 # Read and cache generate command arguments
64- global LAST_GENERATE_CONTEXTS , LAST_GENERATE_NAMES , LAST_GENERATE_FUNCTION_IDS , LAST_GENERATE_NO_TYPES
64+ global LAST_GENERATE_CONTEXTS , LAST_GENERATE_NAMES , LAST_GENERATE_IDS , LAST_GENERATE_NO_TYPES
6565 contexts_str = config .get ("polyapi" , "last_generate_contexts_used" , fallback = None )
6666 LAST_GENERATE_CONTEXTS = contexts_str .split ("," ) if contexts_str else None
6767 names_str = config .get ("polyapi" , "last_generate_names_used" , fallback = None )
6868 LAST_GENERATE_NAMES = names_str .split ("," ) if names_str else None
69- function_ids_str = config .get ("polyapi" , "last_generate_function_ids_used " , fallback = None )
70- LAST_GENERATE_FUNCTION_IDS = function_ids_str .split ("," ) if function_ids_str else None
69+ ids_str = config .get ("polyapi" , "last_generate_ids_used " , fallback = None )
70+ LAST_GENERATE_IDS = ids_str .split ("," ) if ids_str else None
7171 LAST_GENERATE_NO_TYPES = config .get ("polyapi" , "last_generate_no_types_used" , fallback = "false" ).lower () == "true"
7272
7373 return key , url
@@ -152,14 +152,14 @@ def get_direct_execute_config() -> bool:
152152
153153def get_cached_generate_args () -> Tuple [list | None , list | None , list | None , bool ]:
154154 """Return cached generate command arguments"""
155- global LAST_GENERATE_CONTEXTS , LAST_GENERATE_NAMES , LAST_GENERATE_FUNCTION_IDS , LAST_GENERATE_NO_TYPES
156- if LAST_GENERATE_CONTEXTS is None and LAST_GENERATE_NAMES is None and LAST_GENERATE_FUNCTION_IDS is None and LAST_GENERATE_NO_TYPES is None :
155+ global LAST_GENERATE_CONTEXTS , LAST_GENERATE_NAMES , LAST_GENERATE_IDS , LAST_GENERATE_NO_TYPES
156+ if LAST_GENERATE_CONTEXTS is None and LAST_GENERATE_NAMES is None and LAST_GENERATE_IDS is None and LAST_GENERATE_NO_TYPES is None :
157157 # Force a config read if values aren't cached
158158 get_api_key_and_url ()
159- return LAST_GENERATE_CONTEXTS , LAST_GENERATE_NAMES , LAST_GENERATE_FUNCTION_IDS , bool (LAST_GENERATE_NO_TYPES )
159+ return LAST_GENERATE_CONTEXTS , LAST_GENERATE_NAMES , LAST_GENERATE_IDS , bool (LAST_GENERATE_NO_TYPES )
160160
161161
162- def cache_generate_args (contexts : list | None = None , names : list | None = None , function_ids : list | None = None , no_types : bool = False ):
162+ def cache_generate_args (contexts : list | None = None , names : list | None = None , ids : list | None = None , no_types : bool = False ):
163163 """Cache generate command arguments to config file"""
164164 from typing import List
165165
@@ -176,10 +176,10 @@ def cache_generate_args(contexts: list | None = None, names: list | None = None,
176176 config ["polyapi" ] = {}
177177
178178 # Update cached values
179- global LAST_GENERATE_CONTEXTS , LAST_GENERATE_NAMES , LAST_GENERATE_FUNCTION_IDS , LAST_GENERATE_NO_TYPES
179+ global LAST_GENERATE_CONTEXTS , LAST_GENERATE_NAMES , LAST_GENERATE_IDS , LAST_GENERATE_NO_TYPES
180180 LAST_GENERATE_CONTEXTS = contexts
181181 LAST_GENERATE_NAMES = names
182- LAST_GENERATE_FUNCTION_IDS = function_ids
182+ LAST_GENERATE_IDS = ids
183183 LAST_GENERATE_NO_TYPES = no_types
184184
185185 # Write values to config
@@ -193,10 +193,10 @@ def cache_generate_args(contexts: list | None = None, names: list | None = None,
193193 elif config .has_option ("polyapi" , "last_generate_names_used" ):
194194 config .remove_option ("polyapi" , "last_generate_names_used" )
195195
196- if function_ids is not None :
197- config .set ("polyapi" , "last_generate_function_ids_used " , "," .join (function_ids ))
198- elif config .has_option ("polyapi" , "last_generate_function_ids_used " ):
199- config .remove_option ("polyapi" , "last_generate_function_ids_used " )
196+ if ids is not None :
197+ config .set ("polyapi" , "last_generate_ids_used " , "," .join (ids ))
198+ elif config .has_option ("polyapi" , "last_generate_ids_used " ):
199+ config .remove_option ("polyapi" , "last_generate_ids_used " )
200200
201201 config .set ("polyapi" , "last_generate_no_types_used" , str (no_types ).lower ())
202202
0 commit comments