From 55becdb193d57ba8e94e9a5d1146a78ca15acdd4 Mon Sep 17 00:00:00 2001 From: oGre Date: Mon, 5 Oct 2015 07:11:57 +0200 Subject: [PATCH] Minor reformatting --- gitstatus.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gitstatus.py b/gitstatus.py index cca3010..da175ba 100755 --- a/gitstatus.py +++ b/gitstatus.py @@ -52,7 +52,7 @@ def get_tag_or_hash(): cmd = Popen(['git', 'rev-parse', '--short', 'HEAD'], stdout=PIPE, stderr=PIPE) so, se = cmd.communicate() hash_name = '%s' % so.decode('utf-8').strip() - return symbols['prehash'] + hash_name + return ''.join([symbols['prehash'], hash_name]) def get_stash(): @@ -69,8 +69,7 @@ def get_stash(): # `git status --porcelain --branch` can collect all information # branch, remote_branch, untracked, staged, changed, conflicts, ahead, behind -po = Popen(['git', 'status', '--porcelain', '--branch'], env={'LC_ALL': 'C'}, - stdout=PIPE, stderr=PIPE) +po = Popen(['git', 'status', '--porcelain', '--branch'], env={'LC_ALL': 'C'}, stdout=PIPE, stderr=PIPE) stdout, stderr = po.communicate() if po.returncode != 0: sys.exit(0) # Not a git repository @@ -107,10 +106,7 @@ for st in status: elif 'behind' in div: num_behind = int(div[len('behind '):].strip()) behind = '%s%s' % (symbols['behind'], num_behind) - remote = ''.join([ - behind, - ahead - ]) + remote = ''.join([behind, ahead]) elif st[0] == '?' and st[1] == '?': untracked.append(st) else: