diff options
author | Tristan Partin <tristan@partin.io> | 2023-07-12 17:47:12 -0500 |
---|---|---|
committer | Tristan Partin <tristan@partin.io> | 2023-07-12 18:56:06 -0500 |
commit | d4bcf05c39e650d9651b5f2c60e7c12d59367e9c (patch) | |
tree | 1d635627d62aba0d77142583c7d1479d5e7b4d31 /mesonbuild/compilers/cpp.py | |
parent | 921c2370a722cbaa42bd256c699fae3185084939 (diff) | |
download | meson-d4bcf05c39e650d9651b5f2c60e7c12d59367e9c.zip meson-d4bcf05c39e650d9651b5f2c60e7c12d59367e9c.tar.gz meson-d4bcf05c39e650d9651b5f2c60e7c12d59367e9c.tar.bz2 |
Annotate naked fundamental Python types
Although mypy wasn't complaining, pyright was.
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
-rw-r--r-- | mesonbuild/compilers/cpp.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index f17b0d2..cd1ed93 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -266,7 +266,7 @@ class ClangCPPCompiler(_StdCPPLibMixin, ClangCompiler, CPPCompiler): return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - args = [] + args: T.List[str] = [] key = OptionKey('std', machine=self.for_machine, lang=self.language) std = options[key] if std.value != 'none': @@ -318,7 +318,7 @@ class EmscriptenCPPCompiler(EmscriptenMixin, ClangCPPCompiler): defines=defines, full_version=full_version) def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - args = [] + args: T.List[str] = [] key = OptionKey('std', machine=self.for_machine, lang=self.language) std = options[key] if std.value != 'none': @@ -362,7 +362,7 @@ class ArmclangCPPCompiler(ArmclangCompiler, CPPCompiler): return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - args = [] + args: T.List[str] = [] key = OptionKey('std', machine=self.for_machine, lang=self.language) std = options[key] if std.value != 'none': @@ -428,7 +428,7 @@ class GnuCPPCompiler(_StdCPPLibMixin, GnuCompiler, CPPCompiler): return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - args = [] + args: T.List[str] = [] key = OptionKey('std', machine=self.for_machine, lang=self.language) std = options[key] if std.value != 'none': @@ -539,7 +539,7 @@ class ElbrusCPPCompiler(ElbrusCompiler, CPPCompiler): # Elbrus C++ compiler does not support RTTI, so don't check for it. def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - args = [] + args: T.List[str] = [] key = OptionKey('std', machine=self.for_machine, lang=self.language) std = options[key] if std.value != 'none': @@ -600,7 +600,7 @@ class IntelCPPCompiler(IntelGnuLikeCompiler, CPPCompiler): return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - args = [] + args: T.List[str] = [] key = OptionKey('std', machine=self.for_machine, lang=self.language) std = options[key] if std.value != 'none': @@ -667,7 +667,7 @@ class VisualStudioLikeCPPCompilerMixin(CompilerMixinBase): return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - args = [] + args: T.List[str] = [] key = OptionKey('std', machine=self.for_machine, lang=self.language) eh = options[key.evolve('eh')] @@ -832,7 +832,7 @@ class ArmCPPCompiler(ArmCompiler, CPPCompiler): return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - args = [] + args: T.List[str] = [] key = OptionKey('std', machine=self.for_machine, lang=self.language) std = options[key] if std.value == 'c++11': @@ -892,7 +892,7 @@ class TICPPCompiler(TICompiler, CPPCompiler): return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - args = [] + args: T.List[str] = [] key = OptionKey('std', machine=self.for_machine, lang=self.language) std = options[key] if std.value != 'none': @@ -931,7 +931,7 @@ class MetrowerksCPPCompilerARM(MetrowerksCompiler, CPPCompiler): return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - args = [] + args: T.List[str] = [] std = options[OptionKey('std', machine=self.for_machine, lang=self.language)] if std.value != 'none': args.append('-lang') @@ -960,7 +960,7 @@ class MetrowerksCPPCompilerEmbeddedPowerPC(MetrowerksCompiler, CPPCompiler): return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: - args = [] + args: T.List[str] = [] std = options[OptionKey('std', machine=self.for_machine, lang=self.language)] if std.value != 'none': args.append('-lang ' + std.value) |