aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/compilers/mixins/pgi.py13
-rwxr-xr-xrun_mypy.py1
2 files changed, 12 insertions, 2 deletions
diff --git a/mesonbuild/compilers/mixins/pgi.py b/mesonbuild/compilers/mixins/pgi.py
index 77a7a28..d69abda 100644
--- a/mesonbuild/compilers/mixins/pgi.py
+++ b/mesonbuild/compilers/mixins/pgi.py
@@ -20,6 +20,10 @@ from pathlib import Path
from ..compilers import clike_debug_args, clike_optimization_args
+if T.TYPE_CHECKING:
+ from ...envconfig import MachineInfo
+ from ...environment import Environment
+
pgi_buildtype_args = {
'plain': [],
'debug': [],
@@ -31,7 +35,12 @@ pgi_buildtype_args = {
class PGICompiler:
- def __init__(self):
+
+ if T.TYPE_CHECKING:
+ info = MachineInfo('', '', '', '')
+ language = ''
+
+ def __init__(self) -> None:
self.base_options = ['b_pch']
self.id = 'pgi'
@@ -94,6 +103,6 @@ class PGICompiler:
else:
return []
- def thread_flags(self, env):
+ def thread_flags(self, env: 'Environment') -> T.List[str]:
# PGI cannot accept -pthread, it's already threaded
return []
diff --git a/run_mypy.py b/run_mypy.py
index db05b70..8aaae87 100755
--- a/run_mypy.py
+++ b/run_mypy.py
@@ -26,6 +26,7 @@ modules = [
'mesonbuild/compilers/mixins/gnu.py',
'mesonbuild/compilers/mixins/intel.py',
'mesonbuild/compilers/mixins/islinker.py',
+ 'mesonbuild/compilers/mixins/pgi.py',
# 'mesonbuild/coredata.py',
'mesonbuild/dependencies/boost.py',
'mesonbuild/dependencies/hdf5.py',