Skip to content
Snippets Groups Projects
Commit 29a0bf3e authored by Sean Farley's avatar Sean Farley
Browse files

util: flake8 cleanup

parent 5322f12e
No related branches found
No related tags found
No related merge requests found
......@@ -11,11 +11,12 @@
"""Fills OrderedDict with hgsub file content passed as list of lines"""
rv = OrderedDict()
for l in lines:
ls = l.strip();
if not ls or ls[0] == '#': continue
ls = l.strip()
if not ls or ls[0] == '#':
continue
name, value = l.split('=', 1)
rv[name.strip()] = value.strip()
return rv
def serialize_hgsub(data):
"""Produces a string from OrderedDict hgsub content"""
......@@ -16,12 +17,12 @@
name, value = l.split('=', 1)
rv[name.strip()] = value.strip()
return rv
def serialize_hgsub(data):
"""Produces a string from OrderedDict hgsub content"""
return ''.join(['%s = %s\n' % (n,v) for n,v in data.iteritems()])
return ''.join(['%s = %s\n' % (n, v) for n, v in data.iteritems()])
def parse_hgsubstate(lines):
"""Fills OrderedDict with hgsubtate file content passed as list of lines"""
rv = OrderedDict()
for l in lines:
......@@ -23,10 +24,11 @@
def parse_hgsubstate(lines):
"""Fills OrderedDict with hgsubtate file content passed as list of lines"""
rv = OrderedDict()
for l in lines:
ls = l.strip();
if not ls or ls[0] == '#': continue
ls = l.strip()
if not ls or ls[0] == '#':
continue
value, name = l.split(' ', 1)
rv[name.strip()] = value.strip()
return rv
......@@ -36,7 +38,7 @@
return ''.join(['%s %s\n' % (data[n], n) for n in sorted(data)])
def transform_notgit(f):
'''use as a decorator around functions and methods that call into dulwich'''
'''use as a decorator around functions that call into dulwich'''
def inner(*args, **kwargs):
try:
return f(*args, **kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment