4141from mesonbuild import envconfig
4242
4343if T .TYPE_CHECKING :
44- from configparser import ConfigParser
45-
4644 from .compilers import Compiler
4745 from .compilers .mixins .visualstudio import VisualStudioLikeCompiler
46+ from .options import ElementaryOptionValues
4847 from .wrap .wrap import Resolver
4948 from . import cargo
5049
@@ -633,7 +632,7 @@ def __init__(self, source_dir: str, build_dir: str, cmd_options: coredata.Shared
633632 #
634633 # Note that order matters because of 'buildtype', if it is after
635634 # 'optimization' and 'debug' keys, it override them.
636- self .options : T .MutableMapping [OptionKey , T . Union [ str , T . List [ str ]] ] = collections .OrderedDict ()
635+ self .options : T .MutableMapping [OptionKey , ElementaryOptionValues ] = collections .OrderedDict ()
637636
638637 self .machinestore = machinefile .MachineFileStore (self .coredata .config_files , self .coredata .cross_files , self .source_dir )
639638
@@ -701,7 +700,7 @@ def __init__(self, source_dir: str, build_dir: str, cmd_options: coredata.Shared
701700 # Store a global state of Cargo dependencies
702701 self .cargo : T .Optional [cargo .Interpreter ] = None
703702
704- def mfilestr2key (self , machine_file_string : str , section_subproject : str , machine : MachineChoice ):
703+ def mfilestr2key (self , machine_file_string : str , section_subproject : str , machine : MachineChoice ) -> OptionKey :
705704 key = OptionKey .from_string (machine_file_string )
706705 assert key .machine == MachineChoice .HOST
707706 if key .subproject :
@@ -712,7 +711,8 @@ def mfilestr2key(self, machine_file_string: str, section_subproject: str, machin
712711 return key .evolve (machine = machine )
713712 return key
714713
715- def _load_machine_file_options (self , config : 'ConfigParser' , properties : Properties , machine : MachineChoice ) -> None :
714+ def _load_machine_file_options (self , config : T .Mapping [str , T .Mapping [str , ElementaryOptionValues ]],
715+ properties : Properties , machine : MachineChoice ) -> None :
716716 """Read the contents of a Machine file and put it in the options store."""
717717
718718 # Look for any options in the deprecated paths section, warn about
0 commit comments