lgtm: Fix redundant code

pull/6289/head
Daniel Mensinger 5 years ago committed by Jussi Pakkanen
parent ef19e1ff2d
commit e4a0ee205d
  1. 1
      mesonbuild/compilers/mixins/clike.py
  2. 4
      mesonbuild/coredata.py
  3. 1
      mesonbuild/dependencies/base.py
  4. 6
      mesonbuild/dependencies/ui.py
  5. 1
      mesonbuild/minstall.py
  6. 1
      mesonbuild/mintro.py
  7. 1
      mesonbuild/mparser.py

@ -167,7 +167,6 @@ class CLikeCompiler:
retval.append(d)
# at this point, it's an ELF file which doesn't match the
# appropriate elf_class, so skip this one
pass
return tuple(retval)
@functools.lru_cache()

@ -618,8 +618,7 @@ class CoreData:
except MesonException as e:
raise type(e)(('Validation failed for option %s: ' % option_name) + str(e)) \
.with_traceback(sys.exc_info()[2])
else:
raise MesonException('Tried to validate unknown option %s.' % option_name)
raise MesonException('Tried to validate unknown option %s.' % option_name)
def get_external_args(self, for_machine: MachineChoice, lang):
return self.compiler_options[for_machine][lang + '_args'].value
@ -659,7 +658,6 @@ class CoreData:
if not self.is_cross_build():
options = self.strip_build_option_names(options)
# Set prefix first because it's needed to sanitize other options
prefix = self.builtins['prefix'].value
if 'prefix' in options:
prefix = self.sanitize_prefix(options['prefix'])
self.builtins['prefix'].set_value(prefix)

@ -1794,7 +1794,6 @@ class ExternalProgram:
return commands + [script]
except Exception as e:
mlog.debug(e)
pass
mlog.debug('Unusable script {!r}'.format(script))
return False

@ -605,16 +605,14 @@ class VulkanDependency(ExternalDependency):
# TODO: this config might not work on some platforms, fix bugs as reported
# we should at least detect other 64-bit platforms (e.g. armv8)
lib_name = 'vulkan'
lib_dir = 'lib'
inc_dir = 'include'
if mesonlib.is_windows():
lib_name = 'vulkan-1'
lib_dir = 'Lib32'
inc_dir = 'Include'
if detect_cpu_family(self.env.coredata.compilers.host) == 'x86_64':
lib_dir = 'Lib'
else:
lib_name = 'vulkan'
lib_dir = 'lib'
inc_dir = 'include'
# make sure header and lib are valid
inc_path = os.path.join(self.vulkan_sdk, inc_dir)

@ -503,7 +503,6 @@ def run(opts):
log_dir = os.path.join(private_dir, '../meson-logs')
if not os.path.exists(os.path.join(opts.wd, datafilename)):
sys.exit('Install data not found. Run this command in build directory root.')
log_dir = os.path.join(private_dir, '../meson-logs')
if not opts.no_rebuild:
if not rebuild_all(opts.wd):
sys.exit(-1)

@ -405,7 +405,6 @@ def run(options):
'meson version. Please regenerate it in this case.')
return 1
intro_vers = '0.0.0'
with open(infofile, 'r') as fp:
raw = json.load(fp)
intro_vers = raw.get('introspection', {}).get('version', {}).get('full', '0.0.0')

@ -674,7 +674,6 @@ class Parser:
a = ArgumentNode(s)
while not isinstance(s, EmptyNode):
potential = self.current
if self.accept('colon'):
a.set_kwarg(s, self.statement())
potential = self.current

Loading…
Cancel
Save