fix LGTM warnings
This commit is contained in:
parent
e81acbd606
commit
a539fda0cf
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from collections import OrderedDict, defaultdict
|
||||
from collections import OrderedDict
|
||||
from functools import lru_cache
|
||||
import copy
|
||||
import hashlib
|
||||
|
@ -32,7 +32,7 @@ from .mesonlib import (
|
|||
OptionKey,
|
||||
)
|
||||
from .compilers import (
|
||||
Compiler, all_languages, is_object, clink_langs, sort_clink, lang_suffixes,
|
||||
Compiler, is_object, clink_langs, sort_clink, lang_suffixes,
|
||||
is_known_suffix
|
||||
)
|
||||
from .linkers import StaticLinker
|
||||
|
|
|
@ -17,7 +17,7 @@ import pickle, os, uuid
|
|||
import sys
|
||||
from itertools import chain
|
||||
from pathlib import PurePath
|
||||
from collections import OrderedDict, defaultdict
|
||||
from collections import OrderedDict
|
||||
from .mesonlib import (
|
||||
MesonException, EnvironmentException, MachineChoice, PerMachine,
|
||||
default_libdir, default_libexecdir, default_prefix, split_args,
|
||||
|
|
|
@ -1142,7 +1142,6 @@ class CompilerHolder(InterpreterObject):
|
|||
i.held_object.get_curdir(), idir)
|
||||
args += self.compiler.get_include_args(idir, False)
|
||||
if not nobuiltins:
|
||||
for_machine = Interpreter.machine_from_native_kwarg(kwargs)
|
||||
opts = self.environment.coredata.options
|
||||
args += self.compiler.get_option_compile_args(opts)
|
||||
if mode == 'link':
|
||||
|
|
|
@ -20,8 +20,7 @@ import stat
|
|||
import time
|
||||
import platform, subprocess, operator, os, shlex, shutil, re
|
||||
import collections
|
||||
from enum import IntEnum
|
||||
from functools import lru_cache, wraps
|
||||
from functools import lru_cache, wraps, total_ordering
|
||||
from itertools import tee, filterfalse
|
||||
from tempfile import TemporaryDirectory
|
||||
import typing as T
|
||||
|
@ -348,7 +347,7 @@ def classify_unity_sources(compilers: T.Iterable['CompilerType'], sources: T.Ite
|
|||
return compsrclist
|
||||
|
||||
|
||||
class MachineChoice(IntEnum):
|
||||
class MachineChoice(enum.IntEnum):
|
||||
|
||||
"""Enum class representing one of the two abstract machine names used in
|
||||
most places: the build, and host, machines.
|
||||
|
@ -1617,7 +1616,7 @@ def relative_to_if_possible(path: Path, root: Path, resolve: bool = False) -> Pa
|
|||
except ValueError:
|
||||
return path
|
||||
|
||||
class LibType(IntEnum):
|
||||
class LibType(enum.IntEnum):
|
||||
|
||||
"""Enumeration for library types."""
|
||||
|
||||
|
@ -1854,6 +1853,7 @@ def _classify_argument(key: 'OptionKey') -> OptionType:
|
|||
return OptionType.PROJECT
|
||||
|
||||
|
||||
@total_ordering
|
||||
class OptionKey:
|
||||
|
||||
"""Represents an option key in the various option dictionaries.
|
||||
|
|
|
@ -34,7 +34,7 @@ import typing as T
|
|||
import os
|
||||
import argparse
|
||||
|
||||
from .mesonlib import MachineChoice, OptionKey
|
||||
from .mesonlib import OptionKey
|
||||
|
||||
def get_meson_info_file(info_dir: str) -> str:
|
||||
return os.path.join(info_dir, 'meson-info.json')
|
||||
|
|
Loading…
Reference in New Issue