From d4bcf05c39e650d9651b5f2c60e7c12d59367e9c Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Wed, 12 Jul 2023 17:47:12 -0500 Subject: Annotate naked fundamental Python types Although mypy wasn't complaining, pyright was. --- mesonbuild/compilers/cpp.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'mesonbuild/compilers/cpp.py') 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) -- cgit v1.1