style: fix E703 violations

E703: statement ends with a semicolon

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
pull/1255/head
Igor Gnatenko 8 years ago committed by Jussi Pakkanen
parent 969dc7e995
commit f0bc5568a7
  1. 2
      mesonbuild/build.py
  2. 4
      mesonbuild/mconf.py
  3. 4
      mesonbuild/mparser.py
  4. 14
      mesonbuild/scripts/depfixer.py
  5. 2
      tools/cmake2meson.py

@ -1433,7 +1433,7 @@ class RunTarget:
class Jar(BuildTarget): class Jar(BuildTarget):
def __init__(self, name, subdir, subproject, is_cross, sources, objects, environment, kwargs): def __init__(self, name, subdir, subproject, is_cross, sources, objects, environment, kwargs):
super().__init__(name, subdir, subproject, is_cross, sources, objects, environment, kwargs); super().__init__(name, subdir, subproject, is_cross, sources, objects, environment, kwargs)
for s in self.sources: for s in self.sources:
if not s.endswith('.java'): if not s.endswith('.java'):
raise InvalidArguments('Jar source %s is not a java file.' % s) raise InvalidArguments('Jar source %s is not a java file.' % s)

@ -195,10 +195,10 @@ class Conf:
opt = options[key] opt = options[key]
if (opt.choices is None) or (len(opt.choices) == 0): if (opt.choices is None) or (len(opt.choices) == 0):
# Zero length list or string # Zero length list or string
choices = ''; choices = ''
else: else:
# A non zero length list or string, convert to string # A non zero length list or string, convert to string
choices = str(opt.choices); choices = str(opt.choices)
optarr.append([key, opt.description, opt.value, choices]) optarr.append([key, opt.description, opt.value, choices])
self.print_aligned(optarr) self.print_aligned(optarr)
print('') print('')

@ -76,7 +76,7 @@ class Lexer:
def lex(self, code, subdir): def lex(self, code, subdir):
lineno = 1 lineno = 1
line_start = 0 line_start = 0
loc = 0; loc = 0
par_count = 0 par_count = 0
bracket_count = 0 bracket_count = 0
col = 0 col = 0
@ -519,7 +519,7 @@ class Parser:
def e9(self): def e9(self):
t = self.current t = self.current
if self.accept('true'): if self.accept('true'):
return BooleanNode(t, True); return BooleanNode(t, True)
if self.accept('false'): if self.accept('false'):
return BooleanNode(t, False) return BooleanNode(t, False)
if self.accept('id'): if self.accept('id'):

@ -55,8 +55,8 @@ class DynamicEntry(DataSizes):
super().__init__(ptrsize, is_le) super().__init__(ptrsize, is_le)
self.ptrsize = ptrsize self.ptrsize = ptrsize
if ptrsize == 64: if ptrsize == 64:
self.d_tag = struct.unpack(self.Sxword, ifile.read(self.SxwordSize))[0]; self.d_tag = struct.unpack(self.Sxword, ifile.read(self.SxwordSize))[0]
self.val = struct.unpack(self.XWord, ifile.read(self.XWordSize))[0]; self.val = struct.unpack(self.XWord, ifile.read(self.XWordSize))[0]
else: else:
self.d_tag = struct.unpack(self.Sword, ifile.read(self.SwordSize))[0] self.d_tag = struct.unpack(self.Sword, ifile.read(self.SwordSize))[0]
self.val = struct.unpack(self.Word, ifile.read(self.WordSize))[0] self.val = struct.unpack(self.Word, ifile.read(self.WordSize))[0]
@ -77,7 +77,7 @@ class SectionHeader(DataSizes):
else: else:
is_64 = False is_64 = False
# Elf64_Word # Elf64_Word
self.sh_name = struct.unpack(self.Word, ifile.read(self.WordSize))[0]; self.sh_name = struct.unpack(self.Word, ifile.read(self.WordSize))[0]
# Elf64_Word # Elf64_Word
self.sh_type = struct.unpack(self.Word, ifile.read(self.WordSize))[0] self.sh_type = struct.unpack(self.Word, ifile.read(self.WordSize))[0]
# Elf64_Xword # Elf64_Xword
@ -86,7 +86,7 @@ class SectionHeader(DataSizes):
else: else:
self.sh_flags = struct.unpack(self.Word, ifile.read(self.WordSize))[0] self.sh_flags = struct.unpack(self.Word, ifile.read(self.WordSize))[0]
# Elf64_Addr # Elf64_Addr
self.sh_addr = struct.unpack(self.Addr, ifile.read(self.AddrSize))[0]; self.sh_addr = struct.unpack(self.Addr, ifile.read(self.AddrSize))[0]
# Elf64_Off # Elf64_Off
self.sh_offset = struct.unpack(self.Off, ifile.read(self.OffSize))[0] self.sh_offset = struct.unpack(self.Off, ifile.read(self.OffSize))[0]
# Elf64_Xword # Elf64_Xword
@ -95,9 +95,9 @@ class SectionHeader(DataSizes):
else: else:
self.sh_size = struct.unpack(self.Word, ifile.read(self.WordSize))[0] self.sh_size = struct.unpack(self.Word, ifile.read(self.WordSize))[0]
# Elf64_Word # Elf64_Word
self.sh_link = struct.unpack(self.Word, ifile.read(self.WordSize))[0]; self.sh_link = struct.unpack(self.Word, ifile.read(self.WordSize))[0]
# Elf64_Word # Elf64_Word
self.sh_info = struct.unpack(self.Word, ifile.read(self.WordSize))[0]; self.sh_info = struct.unpack(self.Word, ifile.read(self.WordSize))[0]
# Elf64_Xword # Elf64_Xword
if is_64: if is_64:
self.sh_addralign = struct.unpack(self.XWord, ifile.read(self.XWordSize))[0] self.sh_addralign = struct.unpack(self.XWord, ifile.read(self.XWordSize))[0]
@ -312,7 +312,7 @@ class Elf(DataSizes):
rpentry = self.dynamic[i] rpentry = self.dynamic[i]
rpentry.d_tag = 0 rpentry.d_tag = 0
self.dynamic = self.dynamic[:i] + self.dynamic[i + 1:] + [rpentry] self.dynamic = self.dynamic[:i] + self.dynamic[i + 1:] + [rpentry]
break; break
# DT_MIPS_RLD_MAP_REL is relative to the offset of the tag. Adjust it consequently. # DT_MIPS_RLD_MAP_REL is relative to the offset of the tag. Adjust it consequently.
for entry in self.dynamic[i:]: for entry in self.dynamic[i:]:
if entry.d_tag == DT_MIPS_RLD_MAP_REL: if entry.d_tag == DT_MIPS_RLD_MAP_REL:

@ -46,7 +46,7 @@ class Lexer:
def lex(self, code): def lex(self, code):
lineno = 1 lineno = 1
line_start = 0 line_start = 0
loc = 0; loc = 0
col = 0 col = 0
while(loc < len(code)): while(loc < len(code)):
matched = False matched = False

Loading…
Cancel
Save