diff options
author | Tristan Partin <tristan@partin.io> | 2023-07-12 17:36:25 -0500 |
---|---|---|
committer | Tristan Partin <tristan@partin.io> | 2023-07-12 18:56:06 -0500 |
commit | 921c2370a722cbaa42bd256c699fae3185084939 (patch) | |
tree | 8884965e8f1e1413703f271ceba046e52647d723 /mesonbuild/compilers/mixins/ccrx.py | |
parent | 1624354f33bf0a33f0e715ba1ca391ae0154ad19 (diff) | |
download | meson-921c2370a722cbaa42bd256c699fae3185084939.zip meson-921c2370a722cbaa42bd256c699fae3185084939.tar.gz meson-921c2370a722cbaa42bd256c699fae3185084939.tar.bz2 |
Replace some type comments with annotations
Diffstat (limited to 'mesonbuild/compilers/mixins/ccrx.py')
-rw-r--r-- | mesonbuild/compilers/mixins/ccrx.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/mesonbuild/compilers/mixins/ccrx.py b/mesonbuild/compilers/mixins/ccrx.py index 1c22214..6e503d1 100644 --- a/mesonbuild/compilers/mixins/ccrx.py +++ b/mesonbuild/compilers/mixins/ccrx.py @@ -31,35 +31,35 @@ else: # do). This gives up DRYer type checking, with no runtime impact Compiler = object -ccrx_buildtype_args = { +ccrx_buildtype_args: T.Dict[str, T.List[str]] = { 'plain': [], 'debug': [], 'debugoptimized': [], 'release': [], 'minsize': [], 'custom': [], -} # type: T.Dict[str, T.List[str]] +} -ccrx_optimization_args = { +ccrx_optimization_args: T.Dict[str, T.List[str]] = { '0': ['-optimize=0'], 'g': ['-optimize=0'], '1': ['-optimize=1'], '2': ['-optimize=2'], '3': ['-optimize=max'], 's': ['-optimize=2', '-size'] -} # type: T.Dict[str, T.List[str]] +} -ccrx_debug_args = { +ccrx_debug_args: T.Dict[bool, T.List[str]] = { False: [], True: ['-debug'] -} # type: T.Dict[bool, T.List[str]] +} class CcrxCompiler(Compiler): if T.TYPE_CHECKING: is_cross = True - can_compile_suffixes = set() # type: T.Set[str] + can_compile_suffixes: T.Set[str] = set() id = 'ccrx' @@ -68,12 +68,13 @@ class CcrxCompiler(Compiler): raise EnvironmentException('ccrx supports only cross-compilation.') # Assembly self.can_compile_suffixes.add('src') - default_warn_args = [] # type: T.List[str] - self.warn_args = {'0': [], - '1': default_warn_args, - '2': default_warn_args + [], - '3': default_warn_args + [], - 'everything': default_warn_args + []} # type: T.Dict[str, T.List[str]] + default_warn_args: T.List[str] = [] + self.warn_args: T.Dict[str, T.List[str]] = { + '0': [], + '1': default_warn_args, + '2': default_warn_args + [], + '3': default_warn_args + [], + 'everything': default_warn_args + []} def get_pic_args(self) -> T.List[str]: # PIC support is not enabled by default for CCRX, |