diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-06-04 23:12:46 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-06-05 11:57:01 +0200 |
commit | 1d0bd562f173b5a6c43ec50da4cba5fc5612783a (patch) | |
tree | 81cd3dbe7c77765bedcff5e64ffbb3634e5d5a5c /mesonbuild | |
parent | e0f62d181213a7955d04facffecc52196a08d776 (diff) | |
download | meson-1d0bd562f173b5a6c43ec50da4cba5fc5612783a.zip meson-1d0bd562f173b5a6c43ec50da4cba5fc5612783a.tar.gz meson-1d0bd562f173b5a6c43ec50da4cba5fc5612783a.tar.bz2 |
typing: Fully annotate dependencies.coarrays
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/dependencies/coarrays.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/dependencies/coarrays.py b/mesonbuild/dependencies/coarrays.py index 98bb0ed..e86249f 100644 --- a/mesonbuild/dependencies/coarrays.py +++ b/mesonbuild/dependencies/coarrays.py @@ -21,15 +21,15 @@ from .pkgconfig import PkgConfigDependency from .factory import factory_methods if T.TYPE_CHECKING: - from . base import DependencyType + from . base import Dependency from ..environment import Environment, MachineChoice @factory_methods({DependencyMethods.PKGCONFIG, DependencyMethods.CMAKE, DependencyMethods.SYSTEM}) def coarray_factory(env: 'Environment', for_machine: 'MachineChoice', - kwargs: T.Dict[str, T.Any], methods: T.List[DependencyMethods]) -> T.List['DependencyType']: + kwargs: T.Dict[str, T.Any], methods: T.List[DependencyMethods]) -> T.List[T.Callable[[], 'Dependency']]: fcid = detect_compiler('coarray', env, for_machine, 'fortran').get_id() - candidates = [] # type: T.List[DependencyType] + candidates: T.List[T.Callable[[], 'Dependency']] = [] if fcid == 'gcc': # OpenCoarrays is the most commonly used method for Fortran Coarray with GCC @@ -59,7 +59,7 @@ class CoarrayDependency(ExternalDependency): Coarrays may be thought of as a high-level language abstraction of low-level MPI calls. """ - def __init__(self, environment, kwargs: dict): + def __init__(self, environment: 'Environment', kwargs: T.Dict[str, T.Any]) -> None: super().__init__('coarray', environment, kwargs, language='fortran') kwargs['required'] = False kwargs['silent'] = True @@ -84,5 +84,5 @@ class CoarrayDependency(ExternalDependency): self.is_found = True @staticmethod - def get_methods(): + def get_methods() -> T.List[DependencyMethods]: return [DependencyMethods.AUTO, DependencyMethods.CMAKE, DependencyMethods.PKGCONFIG] |