diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2023-07-17 00:29:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-17 00:29:37 +0300 |
commit | 0dba7340ecfbe84231a14559ef7f9e7dfb7d1299 (patch) | |
tree | ade6d93a8c93bfbfe9df8de6796c93588e3fe080 /mesonbuild/compilers/fortran.py | |
parent | b60ea0851b1dfe4400dc2d12b127300b1da41105 (diff) | |
parent | 9b86c67e19b91eee065c1e3706ad5521801022da (diff) | |
download | meson-0dba7340ecfbe84231a14559ef7f9e7dfb7d1299.zip meson-0dba7340ecfbe84231a14559ef7f9e7dfb7d1299.tar.gz meson-0dba7340ecfbe84231a14559ef7f9e7dfb7d1299.tar.bz2 |
Merge pull request #11976 from tristan957/cleanups
Some various type related cleanups
Diffstat (limited to 'mesonbuild/compilers/fortran.py')
-rw-r--r-- | mesonbuild/compilers/fortran.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index 7c836b7..a80fdff 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -20,6 +20,7 @@ from .. import coredata from .compilers import ( clike_debug_args, Compiler, + CompileCheckMode, ) from .mixins.clike import CLikeCompiler from .mixins.gnu import ( @@ -43,7 +44,6 @@ if T.TYPE_CHECKING: from ..linkers.linkers import DynamicLinker from ..mesonlib import MachineChoice from ..programs import ExternalProgram - from .compilers import CompileCheckMode class FortranCompiler(CLikeCompiler, Compiler): @@ -170,7 +170,7 @@ class GnuFortranCompiler(GnuCompiler, FortranCompiler): 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': @@ -207,7 +207,7 @@ class GnuFortranCompiler(GnuCompiler, FortranCompiler): ''' code = f'{prefix}\n#include <{hname}>' return self.compiles(code, env, extra_args=extra_args, - dependencies=dependencies, mode='preprocess', disable_cache=disable_cache) + dependencies=dependencies, mode=CompileCheckMode.PREPROCESS, disable_cache=disable_cache) class ElbrusFortranCompiler(ElbrusCompiler, FortranCompiler): @@ -311,7 +311,7 @@ class IntelFortranCompiler(IntelGnuLikeCompiler, FortranCompiler): 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] stds = {'legacy': 'none', 'f95': 'f95', 'f2003': 'f03', 'f2008': 'f08', 'f2018': 'f18'} @@ -364,7 +364,7 @@ class IntelClFortranCompiler(IntelVisualStudioLikeCompiler, FortranCompiler): 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] stds = {'legacy': 'none', 'f95': 'f95', 'f2003': 'f03', 'f2008': 'f08', 'f2018': 'f18'} |