Commit f7b3c43b authored by Denis Bilenko's avatar Denis Bilenko

util: pep8

parent 099091c6
...@@ -29,6 +29,7 @@ define_re = re.compile(r'^#define\s+([a-zA-Z_]\w*)(\((?:[^,)]+,)*[^,)]+\))?\s+(. ...@@ -29,6 +29,7 @@ define_re = re.compile(r'^#define\s+([a-zA-Z_]\w*)(\((?:[^,)]+,)*[^,)]+\))?\s+(.
# Conditional directive: # Conditional directive:
condition_re = re.compile(r'^#(ifdef\s+.+|if\s+.+|else\s*|endif\s*)$') condition_re = re.compile(r'^#(ifdef\s+.+|if\s+.+|else\s*|endif\s*)$')
def match_condition(line): def match_condition(line):
line = line.strip() line = line.strip()
if line.endswith(':'): if line.endswith(':'):
...@@ -224,7 +225,7 @@ def expand_to_match(items): ...@@ -224,7 +225,7 @@ def expand_to_match(items):
for configuration, lines in items: for configuration, lines in items:
cfg2newlines[configuration] = [] cfg2newlines[configuration] = []
maxguard = 2**30 maxguard = 2 ** 30
while True: while True:
minimalsourceline = maxguard minimalsourceline = maxguard
for configuration, lines in items: for configuration, lines in items:
...@@ -714,7 +715,7 @@ def dbg(*args): ...@@ -714,7 +715,7 @@ def dbg(*args):
return log(*args) return log(*args)
# itertools is only available in python 2.6 # itertools is not available on python 2.5
# itertools.combinations has a problem on 2.6.1 # itertools.combinations has a problem on 2.6.1
def combinations(iterable, r): def combinations(iterable, r):
......
...@@ -88,7 +88,6 @@ def modify_version(filename, new_version): ...@@ -88,7 +88,6 @@ def modify_version(filename, new_version):
if count != 1: if count != 1:
raise AssertionError('version_info found more than once in %s' % filename) raise AssertionError('version_info found more than once in %s' % filename)
def repl_version(m): def repl_version(m):
result = m.group(0).replace(m.group(1), new_version or m.group(1)) result = m.group(0).replace(m.group(1), new_version or m.group(1))
result += "\n__changeset__ = '%s'" % get_changeset() result += "\n__changeset__ = '%s'" % get_changeset()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment