build: add a few annotations

I was debugging this code, these were trivial, so I added them.
pull/9089/head
Dylan Baker 3 years ago committed by Xavier Claessens
parent 223991c09e
commit 8a7451e051
  1. 8
      mesonbuild/build.py

@ -304,22 +304,22 @@ class Build:
def get_install_subdirs(self):
return self.install_dirs
def get_global_args(self, compiler, for_machine):
def get_global_args(self, compiler: 'Compiler', for_machine: 'MachineChoice') -> T.List[str]:
d = self.global_args[for_machine]
return d.get(compiler.get_language(), [])
def get_project_args(self, compiler, project, for_machine):
def get_project_args(self, compiler: 'Compiler', project: str, for_machine: 'MachineChoice') -> T.List[str]:
d = self.projects_args[for_machine]
args = d.get(project)
if not args:
return []
return args.get(compiler.get_language(), [])
def get_global_link_args(self, compiler, for_machine):
def get_global_link_args(self, compiler: 'Compiler', for_machine: 'MachineChoice') -> T.List[str]:
d = self.global_link_args[for_machine]
return d.get(compiler.get_language(), [])
def get_project_link_args(self, compiler, project, for_machine):
def get_project_link_args(self, compiler: 'Compiler', project: str, for_machine: 'MachineChoice') -> T.List[str]:
d = self.projects_link_args[for_machine]
link_args = d.get(project)

Loading…
Cancel
Save