aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-09-14 01:22:21 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-09-14 15:55:07 -0400
commit87e13af1c85c037079ad5e286975fb5be32d821c (patch)
treea8c69a73f9f9da20f04da39e70510fb5c84b3407 /mesonbuild/compilers
parent6cc1b8441c0cf7428e52bdf1cd541ea830a4eb83 (diff)
downloadmeson-87e13af1c85c037079ad5e286975fb5be32d821c.zip
meson-87e13af1c85c037079ad5e286975fb5be32d821c.tar.gz
meson-87e13af1c85c037079ad5e286975fb5be32d821c.tar.bz2
apply flake8 fixes for unused imports and missing imports
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/compilers.py4
-rw-r--r--mesonbuild/compilers/detect.py1
-rw-r--r--mesonbuild/compilers/mixins/intel.py7
3 files changed, 3 insertions, 9 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index ed77df6..de5e472 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -32,13 +32,13 @@ from ..arglist import CompilerArgs
if T.TYPE_CHECKING:
from ..build import BuildTarget
- from ..coredata import OptionDictType, KeyedOptionDictType
+ from ..coredata import KeyedOptionDictType
from ..envconfig import MachineInfo
from ..environment import Environment
from ..linkers import DynamicLinker, RSPFileSyntax
from ..dependencies import Dependency
- CompilerType = T.TypeVar('CompilerType', bound=Compiler)
+ CompilerType = T.TypeVar('CompilerType', bound='Compiler')
_T = T.TypeVar('_T')
"""This file contains the data files of all compilers Meson knows
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py
index de1845a..59b425b 100644
--- a/mesonbuild/compilers/detect.py
+++ b/mesonbuild/compilers/detect.py
@@ -142,7 +142,6 @@ import typing as T
if T.TYPE_CHECKING:
from ..environment import Environment
from ..programs import ExternalProgram
- from .compilers import CompilerType
diff --git a/mesonbuild/compilers/mixins/intel.py b/mesonbuild/compilers/mixins/intel.py
index 89f3518..1417743 100644
--- a/mesonbuild/compilers/mixins/intel.py
+++ b/mesonbuild/compilers/mixins/intel.py
@@ -28,11 +28,6 @@ from ..compilers import CompileCheckMode
from .gnu import GnuLikeCompiler
from .visualstudio import VisualStudioLikeCompiler
-if T.TYPE_CHECKING:
- from ...arglist import CompilerArgs
- from ...dependencies import Dependency
- from ...environment import Environment
-
# XXX: avoid circular dependencies
# TODO: this belongs in a posix compiler class
# NOTE: the default Intel optimization is -O2, unlike GNU which defaults to -O0.
@@ -186,4 +181,4 @@ class IntelVisualStudioLikeCompiler(VisualStudioLikeCompiler):
return self.OPTIM_ARGS[optimization_level]
def get_pch_base_name(self, header: str) -> str:
- return os.path.basename(header) \ No newline at end of file
+ return os.path.basename(header)