diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index d347e6605..14e0fc39f 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -21,7 +21,7 @@ from .. import compilers import json import subprocess from ..mesonlib import MesonException, OrderedSet -from ..mesonlib import get_compiler_for_source, classify_unity_sources +from ..mesonlib import classify_unity_sources from ..mesonlib import File from ..compilers import CompilerArgs from collections import OrderedDict diff --git a/mesonbuild/compilers/__init__.py b/mesonbuild/compilers/__init__.py index 288b3f530..6b31ccac1 100644 --- a/mesonbuild/compilers/__init__.py +++ b/mesonbuild/compilers/__init__.py @@ -41,6 +41,8 @@ __all__ = [ 'sanitizer_compile_args', 'sort_clike', + 'ArmCCompiler', + 'ArmCPPCompiler', 'CCompiler', 'ClangCCompiler', 'ClangCompiler', diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index e14d3d836..90105a0a6 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import subprocess, os.path, tempfile +import subprocess, os.path from .. import mlog from .. import coredata diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index fcb658be4..b61398fbe 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -1281,7 +1281,6 @@ class ElbrusCompiler(GnuCompiler): break return paths - class ClangCompiler: def __init__(self, clang_type): self.id = 'clang' diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 22f3d676b..c3bb59d57 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -14,7 +14,6 @@ import os.path -from .. import mlog from .. import coredata from ..mesonlib import version_compare diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index 16a89b2c6..d0b538a8c 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os.path, subprocess - from .c import CCompiler from .compilers import ( ICC_STANDARD, diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py index 9ac5d4a92..96784aa87 100644 --- a/mesonbuild/mconf.py +++ b/mesonbuild/mconf.py @@ -15,7 +15,6 @@ import os import sys import argparse -import shlex from . import (coredata, mesonlib, build) def buildparser(): diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py index 55bbbd3bc..e871b8729 100644 --- a/mesonbuild/modules/__init__.py +++ b/mesonbuild/modules/__init__.py @@ -1,9 +1,7 @@ import os from .. import build -from .. import dependencies from .. import mlog -from ..mesonlib import MesonException class permittedSnippetKwargs: diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 436a0e449..6db05ae50 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1382,7 +1382,6 @@ G_END_DECLS''' build_dir = os.path.join(state.environment.get_build_dir(), state.subdir) source_dir = os.path.join(state.environment.get_source_dir(), state.subdir) pkg_cmd, vapi_depends, vapi_packages, vapi_includes = self._extract_vapi_packages(state, kwargs) - target_name = 'generate_vapi({})'.format(library) if 'VAPIGEN' in os.environ: cmd = [self.interpreter.find_program_impl(os.environ['VAPIGEN'])] else: diff --git a/mesonbuild/scripts/meson_install.py b/mesonbuild/scripts/meson_install.py index eaa992b58..3b3be114d 100644 --- a/mesonbuild/scripts/meson_install.py +++ b/mesonbuild/scripts/meson_install.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import sys, pickle, os, shutil, subprocess, gzip, platform, errno +import sys, pickle, os, shutil, subprocess, gzip, errno import shlex from glob import glob from . import depfixer diff --git a/setup.cfg b/setup.cfg index edcf3c564..669c932c1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,4 +20,8 @@ ignore = E402, # E731: do not assign a lambda expression, use a def (too many false positives) E731 + # E741: ambiguous variable name 'l' + E741 + # E722: do not use bare except' + E722 max-line-length = 120