diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-08-10 21:19:29 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-08-11 13:41:03 -0400 |
commit | 90ce0841441506e3f409ab59ded1df8f2e6e7363 (patch) | |
tree | 3478769eef2620e9d7b5a41b73dd94c75b003465 /mesonbuild/linkers | |
parent | de1cc0b02bcb1bab6977f0ab8bb3fef0cd0646dd (diff) | |
download | meson-90ce0841441506e3f409ab59ded1df8f2e6e7363.zip meson-90ce0841441506e3f409ab59ded1df8f2e6e7363.tar.gz meson-90ce0841441506e3f409ab59ded1df8f2e6e7363.tar.bz2 |
treewide: automatic rewriting of all comment-style type annotations
Performed using https://github.com/ilevkivskyi/com2ann
This has no actual effect on the codebase as type checkers (still)
support both and negligible effect on runtime performance since
__future__ annotations ameliorates that. Technically, the bytecode would
be bigger for non function-local annotations, of which we have many
either way.
So if it doesn't really matter, why do a large-scale refactor? Simple:
because people keep wanting to, but it's getting nickle-and-dimed. If
we're going to do this we might as well do it consistently in one shot,
using tooling that guarantees repeatability and correctness.
Repeat with:
```
com2ann mesonbuild/
```
Diffstat (limited to 'mesonbuild/linkers')
-rw-r--r-- | mesonbuild/linkers/detect.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/linkers/detect.py b/mesonbuild/linkers/detect.py index e09a28e..4261144 100644 --- a/mesonbuild/linkers/detect.py +++ b/mesonbuild/linkers/detect.py @@ -61,7 +61,7 @@ def guess_win_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Ty check_args += env.coredata.get_external_link_args(for_machine, comp_class.language) - override = [] # type: T.List[str] + override: T.List[str] = [] value = env.lookup_binary_entry(for_machine, comp_class.language + '_ld') if value is not None: override = comp_class.use_linker_args(value[0], comp_version) @@ -138,7 +138,7 @@ def guess_nix_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Ty else: check_args = comp_class.LINKER_PREFIX + ['--version'] + extra_args - override = [] # type: T.List[str] + override: T.List[str] = [] value = env.lookup_binary_entry(for_machine, comp_class.language + '_ld') if value is not None: override = comp_class.use_linker_args(value[0], comp_version) |