build: Use python 3.6 annotation syntax for Build initializer

pull/8103/head
Dylan Baker 4 years ago
parent 2f66d9f2eb
commit 47c560f3f7
  1. 20
      mesonbuild/build.py

@ -179,18 +179,18 @@ class Build:
self.project_version = None
self.environment = environment
self.projects = {}
self.targets = OrderedDict() # type: T.Dict[str, 'Target']
self.run_target_names = set() # type: T.Set[T.Tuple[str, str]]
self.global_args = PerMachine({}, {}) # type: PerMachine[T.Dict[str, T.List[str]]]
self.projects_args = PerMachine({}, {}) # type: PerMachine[T.Dict[str, T.List[str]]]
self.global_link_args = PerMachine({}, {}) # type: PerMachine[T.Dict[str, T.List[str]]]
self.projects_link_args = PerMachine({}, {}) # type: PerMachine[T.Dict[str, T.List[str]]]
self.tests = [] # type: T.List['Test']
self.benchmarks = [] # type: T.List['Test']
self.targets: T.MutableMapping[str, 'Target'] = OrderedDict()
self.run_target_names: T.Set[T.Tuple[str, str]] = set()
self.global_args: PerMachine[T.Dict[str, T.List[str]]] = PerMachine({}, {})
self.projects_args: PerMachine[T.Dict[str, T.List[str]]] = PerMachine({}, {})
self.global_link_args: PerMachine[T.Dict[str, T.List[str]]] = PerMachine({}, {})
self.projects_link_args: PerMachine[T.Dict[str, T.List[str]]] = PerMachine({}, {})
self.tests: T.List['Test'] = []
self.benchmarks: T.List['Test'] = []
self.headers: T.List[Headers] = []
self.man: T.List[Man] = []
self.data: T.List[Data] = []
self.static_linker = PerMachine(None, None) # type: PerMachine[StaticLinker]
self.static_linker: PerMachine[StaticLinker] = PerMachine(None, None)
self.subprojects = {}
self.subproject_dir = ''
self.install_scripts = []
@ -200,7 +200,7 @@ class Build:
self.dep_manifest_name = None
self.dep_manifest = {}
self.stdlibs = PerMachine({}, {})
self.test_setups = {} # type: T.Dict[str, TestSetup]
self.test_setups: T.Dict[str, TestSetup] = {}
self.test_setup_default_name = None
self.find_overrides = {}
self.searched_programs = set() # The list of all programs that have been searched for.

Loading…
Cancel
Save