Skip to content

Commit 35b6907

Browse files
committed
Remove unnecessary quoting around types
Signed-off-by: Michał Górny <mgorny@quansight.com>
1 parent 6d7e03f commit 35b6907

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

mesonbuild/dependencies/blas_lapack.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class BLASLAPACKMixin(BLASLAPACKMixinBase, metaclass=abc.ABCMeta):
6565
def get_symbol_suffix(self) -> str:
6666
raise NotImplementedError
6767

68-
def parse_modules(self, kwargs: 'DependencyObjectKWs') -> None:
68+
def parse_modules(self, kwargs: DependencyObjectKWs) -> None:
6969
modules: T.List[str] = kwargs.get('modules', [])
7070
valid_modules = ['interface: lp64', 'interface: ilp64', 'cblas', 'lapack', 'lapacke']
7171
for module in modules:
@@ -148,7 +148,7 @@ def probe_symbols(self, compile_args: list[str]) -> bool:
148148

149149

150150
class OpenBLASSystemDependency(OpenBLASMixin, SystemDependency):
151-
def __init__(self, name: str, environment: 'Environment', kwargs: 'DependencyObjectKWs') -> None:
151+
def __init__(self, name: str, environment: Environment, kwargs: DependencyObjectKWs) -> None:
152152
super().__init__(name, environment, kwargs)
153153
self.feature_since = ('1.10.0', '')
154154
self.parse_modules(kwargs)
@@ -215,7 +215,7 @@ def detect_openblas_version(self) -> str:
215215

216216

217217
class OpenBLASPkgConfigDependency(OpenBLASMixin, PkgConfigDependency):
218-
def __init__(self, name: str, env: 'Environment', kwargs: 'DependencyObjectKWs') -> None:
218+
def __init__(self, name: str, env: Environment, kwargs: DependencyObjectKWs) -> None:
219219
self.feature_since = ('1.10.0', '')
220220
self.parse_modules(kwargs)
221221
if self.interface == 'lp64' and name != 'openblas':
@@ -230,7 +230,7 @@ def __init__(self, name: str, env: 'Environment', kwargs: 'DependencyObjectKWs')
230230

231231

232232
class OpenBLASCMakeDependency(OpenBLASMixin, CMakeDependency):
233-
def __init__(self, name: str, env: 'Environment', kwargs: 'DependencyObjectKWs',
233+
def __init__(self, name: str, env: Environment, kwargs: DependencyObjectKWs,
234234
language: T.Optional[str] = None, force_use_global_compilers: bool = False) -> None:
235235
super().__init__('OpenBLAS', env, kwargs, language, force_use_global_compilers)
236236
self.feature_since = ('1.10.0', '')
@@ -267,7 +267,7 @@ def probe_symbols(self, compile_args: list[str], check_cblas: bool = True, check
267267

268268

269269
class NetlibBLASPkgConfigDependency(NetlibMixin, PkgConfigDependency):
270-
def __init__(self, name: str, env: 'Environment', kwargs: 'DependencyObjectKWs') -> None:
270+
def __init__(self, name: str, env: Environment, kwargs: DependencyObjectKWs) -> None:
271271
self.feature_since = ('1.10.0', '')
272272
self.parse_modules(kwargs)
273273
if self.interface == 'lp64' and '64' in name:
@@ -294,7 +294,7 @@ def __init__(self, name: str, env: 'Environment', kwargs: 'DependencyObjectKWs')
294294

295295

296296
class NetlibBLASSystemDependency(NetlibMixin, SystemDependency):
297-
def __init__(self, name: str, environment: 'Environment', kwargs: 'DependencyObjectKWs') -> None:
297+
def __init__(self, name: str, environment: Environment, kwargs: DependencyObjectKWs) -> None:
298298
super().__init__(name, environment, kwargs)
299299
self.feature_since = ('1.10.0', '')
300300
self.parse_modules(kwargs)
@@ -368,7 +368,7 @@ def detect_blas_machine_file(self, props: dict) -> None:
368368

369369

370370
class NetlibLAPACKPkgConfigDependency(NetlibMixin, PkgConfigDependency):
371-
def __init__(self, name: str, env: 'Environment', kwargs: 'DependencyObjectKWs') -> None:
371+
def __init__(self, name: str, env: Environment, kwargs: DependencyObjectKWs) -> None:
372372
self.feature_since = ('1.10.0', '')
373373
self.parse_modules(kwargs)
374374
if self.interface == 'lp64' and '64' in name:
@@ -396,7 +396,7 @@ def __init__(self, name: str, env: 'Environment', kwargs: 'DependencyObjectKWs')
396396

397397

398398
class NetlibLAPACKSystemDependency(NetlibMixin, SystemDependency):
399-
def __init__(self, name: str, environment: 'Environment', kwargs: 'DependencyObjectKWs') -> None:
399+
def __init__(self, name: str, environment: Environment, kwargs: DependencyObjectKWs) -> None:
400400
super().__init__(name, environment, kwargs)
401401
self.feature_since = ('1.10.0', '')
402402
self.parse_modules(kwargs)
@@ -479,7 +479,7 @@ class AccelerateSystemDependency(BLASLAPACKMixin, SystemDependency):
479479
dependency('appleframeworks', modules : 'Accelerate')
480480
481481
"""
482-
def __init__(self, name: str, environment: 'Environment', kwargs: 'DependencyObjectKWs') -> None:
482+
def __init__(self, name: str, environment: Environment, kwargs: DependencyObjectKWs) -> None:
483483
super().__init__(name, environment, kwargs)
484484
self.feature_since = ('1.10.0', '')
485485
self.parse_modules(kwargs)
@@ -499,7 +499,7 @@ def check_macOS_recent_enough(self) -> bool:
499499
sdk_version = subprocess.run(cmd, capture_output=True, check=True, text=True, encoding='utf-8').stdout.strip()
500500
return mesonlib.version_compare(sdk_version, '>=13.3')
501501

502-
def detect(self, kwargs: 'DependencyObjectKWs') -> None:
502+
def detect(self, kwargs: DependencyObjectKWs) -> None:
503503
from .framework import ExtraFrameworkDependency
504504
dep = ExtraFrameworkDependency('Accelerate', self.env, kwargs)
505505
self.is_found = dep.is_found
@@ -522,7 +522,7 @@ def get_symbol_suffix(self) -> str:
522522
# _64 suffixes were added in 2022.2
523523
return '' if self.interface == 'lp64' else self._ilp64_suffix
524524

525-
def parse_mkl_options(self, kwargs: 'DependencyObjectKWs') -> None:
525+
def parse_mkl_options(self, kwargs: DependencyObjectKWs) -> None:
526526
"""Parse `modules` and remove threading and SDL options from it if they are present.
527527
528528
Removing 'threading: <val>' and 'sdl' from `modules` is needed to ensure those
@@ -614,7 +614,7 @@ class MKLPkgConfigDependency(MKLMixin, PkgConfigDependency):
614614
Note that there is also an MKLPkgConfig dependency in scalapack.py, which
615615
has more manual fixes.
616616
"""
617-
def __init__(self, name: str, env: 'Environment', kwargs: 'DependencyObjectKWs') -> None:
617+
def __init__(self, name: str, env: Environment, kwargs: DependencyObjectKWs) -> None:
618618
self.feature_since = ('1.10.0', '')
619619
self.parse_mkl_options(kwargs)
620620
if self.use_sdl == 'auto':
@@ -637,7 +637,7 @@ def __init__(self, name: str, env: 'Environment', kwargs: 'DependencyObjectKWs')
637637

638638
class MKLSystemDependency(MKLMixin, SystemDependency):
639639
"""This only detects MKL's Single Dynamic Library (SDL)"""
640-
def __init__(self, name: str, environment: 'Environment', kwargs: 'DependencyObjectKWs') -> None:
640+
def __init__(self, name: str, environment: Environment, kwargs: DependencyObjectKWs) -> None:
641641
super().__init__(name, environment, kwargs)
642642
self.feature_since = ('1.10.0', '')
643643
self.parse_mkl_options(kwargs)
@@ -685,7 +685,7 @@ def detect_sdl(self) -> None:
685685

686686

687687
class FlexiBLASPkgConfigDependency(BLASLAPACKMixin, PkgConfigDependency):
688-
def __init__(self, name: str, env: 'Environment', kwargs: 'DependencyObjectKWs') -> None:
688+
def __init__(self, name: str, env: Environment, kwargs: DependencyObjectKWs) -> None:
689689
self.feature_since = ('1.10.0', '')
690690
self.parse_modules(kwargs)
691691
if self.interface == 'lp64' and '64' in name:
@@ -723,10 +723,10 @@ def probe_symbols(self, compile_args: list[str], check_cblas: bool = True, check
723723

724724

725725
@factory_methods({DependencyMethods.PKGCONFIG, DependencyMethods.SYSTEM, DependencyMethods.CMAKE})
726-
def openblas_factory(env: 'Environment', for_machine: 'MachineChoice',
727-
kwargs: 'DependencyObjectKWs',
728-
methods: T.List[DependencyMethods]) -> T.List['DependencyGenerator']:
729-
candidates: T.List['DependencyGenerator'] = []
726+
def openblas_factory(env: Environment, for_machine: MachineChoice,
727+
kwargs: DependencyObjectKWs,
728+
methods: T.List[DependencyMethods]) -> T.List[DependencyGenerator]:
729+
candidates: T.List[DependencyGenerator] = []
730730

731731
if DependencyMethods.PKGCONFIG in methods:
732732
for pkg in ['openblas64', 'openblas_ilp64', 'openblas']:
@@ -747,10 +747,10 @@ def openblas_factory(env: 'Environment', for_machine: 'MachineChoice',
747747

748748

749749
@factory_methods({DependencyMethods.PKGCONFIG, DependencyMethods.SYSTEM})
750-
def netlib_blas_factory(env: 'Environment', for_machine: 'MachineChoice',
751-
kwargs: 'DependencyObjectKWs',
752-
methods: T.List[DependencyMethods]) -> T.List['DependencyGenerator']:
753-
candidates: T.List['DependencyGenerator'] = []
750+
def netlib_blas_factory(env: Environment, for_machine: MachineChoice,
751+
kwargs: DependencyObjectKWs,
752+
methods: T.List[DependencyMethods]) -> T.List[DependencyGenerator]:
753+
candidates: T.List[DependencyGenerator] = []
754754

755755
if DependencyMethods.PKGCONFIG in methods:
756756
for pkg in ['blas64-netlib', 'blas-netlib', 'blas64', 'blas']:
@@ -765,10 +765,10 @@ def netlib_blas_factory(env: 'Environment', for_machine: 'MachineChoice',
765765

766766

767767
@factory_methods({DependencyMethods.PKGCONFIG, DependencyMethods.SYSTEM})
768-
def netlib_lapack_factory(env: 'Environment', for_machine: 'MachineChoice',
769-
kwargs: 'DependencyObjectKWs',
770-
methods: T.List[DependencyMethods]) -> T.List['DependencyGenerator']:
771-
candidates: T.List['DependencyGenerator'] = []
768+
def netlib_lapack_factory(env: Environment, for_machine: MachineChoice,
769+
kwargs: DependencyObjectKWs,
770+
methods: T.List[DependencyMethods]) -> T.List[DependencyGenerator]:
771+
candidates: T.List[DependencyGenerator] = []
772772

773773
if DependencyMethods.PKGCONFIG in methods:
774774
for pkg in ['lapack64-netlib', 'lapack-netlib', 'lapack64', 'lapack']:
@@ -783,10 +783,10 @@ def netlib_lapack_factory(env: 'Environment', for_machine: 'MachineChoice',
783783

784784

785785
@factory_methods({DependencyMethods.PKGCONFIG})
786-
def flexiblas_factory(env: 'Environment', for_machine: 'MachineChoice',
787-
kwargs: 'DependencyObjectKWs',
788-
methods: T.List[DependencyMethods]) -> T.List['DependencyGenerator']:
789-
candidates: T.List['DependencyGenerator'] = []
786+
def flexiblas_factory(env: Environment, for_machine: MachineChoice,
787+
kwargs: DependencyObjectKWs,
788+
methods: T.List[DependencyMethods]) -> T.List[DependencyGenerator]:
789+
candidates: T.List[DependencyGenerator] = []
790790

791791
if DependencyMethods.PKGCONFIG in methods:
792792
for pkg in ['flexiblas64', 'flexiblas']:

0 commit comments

Comments
 (0)