diff options
author | John Ericson <git@JohnEricson.me> | 2019-02-25 02:45:20 -0500 |
---|---|---|
committer | John Ericson <git@JohnEricson.me> | 2019-06-09 13:13:27 -0400 |
commit | 3b54f38c845e0b3330a2e1fe3985884eb005e856 (patch) | |
tree | e839d204c6b9b65749b8b686633808264cf931b5 /mesonbuild/build.py | |
parent | 07777e15d47dbddaf849d24b3a30c85745c533ca (diff) | |
download | meson-3b54f38c845e0b3330a2e1fe3985884eb005e856.zip meson-3b54f38c845e0b3330a2e1fe3985884eb005e856.tar.gz meson-3b54f38c845e0b3330a2e1fe3985884eb005e856.tar.bz2 |
Add some type annotations
Some things, like `method[...](...)` or `x: ... = ...` python 3.5
doesn't support, so I made a comment instead with the intention that it
can someday be made into a real annotation.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 763e5c9..7856fbd 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import List import copy, os, re from collections import OrderedDict import itertools, pathlib @@ -30,6 +29,7 @@ from .mesonlib import ( get_filenames_templates_dict, substitute_values, has_path_sep, ) from .compilers import Compiler, is_object, clink_langs, sort_clink, lang_suffixes, get_macos_dylib_install_name +from .linkers import StaticLinker from .interpreterbase import FeatureNew pch_kwargs = set(['c_pch', 'cpp_pch']) @@ -113,16 +113,16 @@ class Build: self.environment = environment self.projects = {} self.targets = OrderedDict() - self.global_args = PerMachine({}, {}) - self.projects_args = PerMachine({}, {}) - self.global_link_args = PerMachine({}, {}) - self.projects_link_args = PerMachine({}, {}) + self.global_args = PerMachine({}, {}) # type: PerMachine[typing.Dict[str, typing.List[str]]] + self.projects_args = PerMachine({}, {}) # type: PerMachine[typing.Dict[str, typing.List[str]]] + self.global_link_args = PerMachine({}, {}) # type: PerMachine[typing.Dict[str, typing.List[str]]] + self.projects_link_args = PerMachine({}, {}) # type: PerMachine[typing.Dict[str, typing.List[str]]] self.tests = [] self.benchmarks = [] self.headers = [] self.man = [] self.data = [] - self.static_linker = PerMachine(None, None) + self.static_linker = PerMachine(None, None) # type: PerMachine[StaticLinker] self.subprojects = {} self.subproject_dir = '' self.install_scripts = [] @@ -1144,7 +1144,7 @@ You probably should put it in link_with instead.''') def get_aliases(self): return {} - def get_langs_used_by_deps(self) -> List[str]: + def get_langs_used_by_deps(self) -> typing.List[str]: ''' Sometimes you want to link to a C++ library that exports C API, which means the linker must link in the C++ stdlib, and we must use a C++ |