22import types
33import logging
44import platform
5- from typing import Optional
5+ from typing import Optional , Dict
66
77from llvmlite import ir
88
1313from .jit_llvm import LLJITCompiler
1414from .function_tracing import trace_function , FunctionTracingResult , Vars , Params
1515
16- from .core_ext import ConstraintIndex , ConstraintSense
16+ from .core_ext import ConstraintIndex
1717from .nleval_ext import (
1818 NLConstraintIndex ,
1919 FunctionIndex ,
@@ -397,7 +397,7 @@ def get_constraint_dual(model, constraint):
397397
398398
399399def match_variable_values (
400- tracing_result : FunctionTracingResult , vars_dict : dict [str , any ]
400+ tracing_result : FunctionTracingResult , vars_dict : Dict [str , any ]
401401):
402402 nx = tracing_result .n_variables ()
403403 variable_indices_map = tracing_result .variable_indices_map
@@ -415,7 +415,7 @@ def match_variable_values(
415415
416416
417417def match_parameter_values (
418- tracing_result : FunctionTracingResult , params_dict : dict [str , any ]
418+ tracing_result : FunctionTracingResult , params_dict : Dict [str , any ]
419419):
420420 np = tracing_result .n_parameters ()
421421 parameter_indices_map = tracing_result .parameter_indices_map
@@ -445,15 +445,15 @@ def __init__(self, jit: str = "LLVM"):
445445 self .jit = jit
446446 self .add_variables = types .MethodType (make_nd_variable , self )
447447
448- self .function_cppad_autodiff_graphs : dict [FunctionIndex , CppADAutodiffGraph ] = (
448+ self .function_cppad_autodiff_graphs : Dict [FunctionIndex , CppADAutodiffGraph ] = (
449449 {}
450450 )
451- self .function_autodiff_structures : dict [
451+ self .function_autodiff_structures : Dict [
452452 FunctionIndex , AutodiffSymbolicStructure
453453 ] = {}
454- self .function_evaluators : dict [FunctionIndex , AutodiffEvaluator ] = {}
455- self .function_names : dict [FunctionIndex , str ] = {}
456- self .function_tracing_results : dict [FunctionIndex , FunctionTracingResult ] = {}
454+ self .function_evaluators : Dict [FunctionIndex , AutodiffEvaluator ] = {}
455+ self .function_names : Dict [FunctionIndex , str ] = {}
456+ self .function_tracing_results : Dict [FunctionIndex , FunctionTracingResult ] = {}
457457
458458 @staticmethod
459459 def supports_variable_attribute (attribute : VariableAttribute , settable = False ):
0 commit comments