style: [E301] expected 1 blank line, found 0
This commit is contained in:
parent
f9344b03a8
commit
84902cb93a
|
@ -261,6 +261,7 @@ int dummy;
|
|||
# because the syntax we use for unity builds is specific to C/++/ObjC/++.
|
||||
# Assembly files cannot be unitified and neither can LLVM IR files
|
||||
langs_cant_unity = ('d', 'fortran')
|
||||
|
||||
def get_target_source_can_unity(self, target, source):
|
||||
if isinstance(source, File):
|
||||
source = source.fname
|
||||
|
|
|
@ -797,8 +797,10 @@ class GTestDependency(Dependency):
|
|||
|
||||
def get_link_args(self):
|
||||
return self.link_args
|
||||
|
||||
def get_version(self):
|
||||
return '1.something_maybe'
|
||||
|
||||
def get_sources(self):
|
||||
return self.sources
|
||||
|
||||
|
|
|
@ -326,6 +326,7 @@ class Environment():
|
|||
if len(rest) == 2:
|
||||
defines[rest[0]] = rest[1]
|
||||
return defines
|
||||
|
||||
@staticmethod
|
||||
def get_gnu_version_from_defines(defines):
|
||||
dot = '.'
|
||||
|
|
|
@ -67,6 +67,7 @@ class PkgConfigModule(ExtensionModule):
|
|||
'Requires.private: {}\n'.format(' '.join(priv_reqs)))
|
||||
if len(conflicts) > 0:
|
||||
ofile.write('Conflicts: {}\n'.format(' '.join(conflicts)))
|
||||
|
||||
def generate_libs_flags(libs):
|
||||
msg = 'Library target {0!r} has {1!r} set. Compilers ' \
|
||||
'may not find it from its \'-l{2}\' linker flag in the ' \
|
||||
|
@ -85,6 +86,7 @@ class PkgConfigModule(ExtensionModule):
|
|||
if l.name_suffix_set:
|
||||
mlog.warning(msg.format(l.name, 'name_suffix', lname, pcfile))
|
||||
yield '-l%s' % lname
|
||||
|
||||
if len(libraries) > 0:
|
||||
ofile.write('Libs: {}\n'.format(' '.join(generate_libs_flags(libraries))))
|
||||
if len(priv_libs) > 0:
|
||||
|
|
|
@ -158,6 +158,7 @@ class Resolver:
|
|||
subprocess.check_call(['git', 'remote', 'set-url',
|
||||
'--push', 'origin', push_url],
|
||||
cwd=checkoutdir)
|
||||
|
||||
def get_hg(self, p):
|
||||
checkoutdir = os.path.join(self.subdir_root, p.get('directory'))
|
||||
revno = p.get('revision')
|
||||
|
|
|
@ -46,9 +46,11 @@ class TestResult:
|
|||
class AutoDeletedDir():
|
||||
def __init__(self, d):
|
||||
self.dir = d
|
||||
|
||||
def __enter__(self):
|
||||
os.makedirs(self.dir, exist_ok=True)
|
||||
return self.dir
|
||||
|
||||
def __exit__(self, _type, value, traceback):
|
||||
# On Windows, shutil.rmtree fails sometimes, because 'the directory is not empty'.
|
||||
# Retrying fixes this.
|
||||
|
|
|
@ -136,6 +136,7 @@ class Converter:
|
|||
ignored_funcs = {'cmake_minimum_required': True,
|
||||
'enable_testing': True,
|
||||
'include': True}
|
||||
|
||||
def __init__(self, cmake_root):
|
||||
self.cmake_root = cmake_root
|
||||
self.indent_unit = ' '
|
||||
|
|
Loading…
Reference in New Issue