From 1f2ea783f88ff694a10a120f1e6d903235ec6627 Mon Sep 17 00:00:00 2001 From: Sean Farley Date: Wed, 22 Apr 2015 16:27:13 -0700 Subject: [PATCH] util: flake8 cleanup --- hggit/util.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hggit/util.py b/hggit/util.py index 12e0e53f7b..ee164fe81c 100644 --- a/hggit/util.py +++ b/hggit/util.py @@ -11,22 +11,24 @@ def parse_hgsub(lines): """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""" - 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: - 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 @@ def serialize_hgsubstate(data): 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)