diff options
author | John Ericson <git@JohnEricson.me> | 2019-02-25 02:45:20 -0500 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-05-02 10:58:23 -0700 |
commit | 4c2617a9c6fd02e3f8831b7de8755380ac4bcb16 (patch) | |
tree | 0214fa8f65cd2b9ef66c88c588401907e868ed9f /mesonbuild/envconfig.py | |
parent | a15a8b7e246be448e79ba20742e713e39807bd00 (diff) | |
download | meson-4c2617a9c6fd02e3f8831b7de8755380ac4bcb16.zip meson-4c2617a9c6fd02e3f8831b7de8755380ac4bcb16.tar.gz meson-4c2617a9c6fd02e3f8831b7de8755380ac4bcb16.tar.bz2 |
Add some type annotations and fix lints
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/envconfig.py')
-rw-r--r-- | mesonbuild/envconfig.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index f4c371f..977d930 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -255,7 +255,7 @@ class MachineInfo: def libdir_layout_is_win(self) -> bool: return self.is_windows() or self.is_cygwin() -class PerMachineDefaultable(PerMachine[_T]): +class PerMachineDefaultable(PerMachine[typing.Optional[_T]]): """Extends `PerMachine` with the ability to default from `None`s. """ def __init__(self) -> None: @@ -285,7 +285,7 @@ class PerMachineDefaultable(PerMachine[_T]): if self.host == self.build: self.host = None -class MachineInfos(PerMachineDefaultable[typing.Optional[MachineInfo]]): +class MachineInfos(PerMachineDefaultable[MachineInfo]): def matches_build_machine(self, machine: MachineChoice) -> bool: return self.build == self[machine] |