From 2dd226459f6c73600ce7f686ca8797097b25c057 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Thu, 11 Nov 2010 21:34:57 +0000 Subject: [PATCH] PEP 8 conformance for ChangeLog writer script * bin/git2gch: Conform to the PEP 8 style guide. --- bin/git2gch | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/bin/git2gch b/bin/git2gch index 70a8de6..a7d9017 100755 --- a/bin/git2gch +++ b/bin/git2gch @@ -7,7 +7,8 @@ u"""Generates potential ChangeLog file contents from commit messages.""" # terms provided in the LICENSE file distributed with this software. # needs GitPython: http://gitorious.org/git-python -import git, time +import git +import time copyright = """\ Copyright (c) 2004-2010 Jeremy Stanley . Permission to @@ -28,15 +29,17 @@ End:\ generated = "" for commit in git.Repo().log(): - header = "%s %s <%s>" % ( - time.strftime("%Y-%m-%d %H:%M:%S UTC", commit.authored_date), - commit.author.name, - commit.author.email - ) - comments = "" - for line in commit.message.split("\n")[1:]: - if line: line = "\t%s" % line - if line.startswith("\t*"): line = "\n%s" % line - comments += "%s\n" % line - generated += "%s\n%s\n" % ( header, comments) -print( "%s%s%s" % (generated, copyright, emacsinfo) ) + header = "%s %s <%s>" % ( + time.strftime("%Y-%m-%d %H:%M:%S UTC", commit.authored_date), + commit.author.name, + commit.author.email + ) + comments = "" + for line in commit.message.split("\n")[1:]: + if line: + line = "\t%s" % line + if line.startswith("\t*"): + line = "\n%s" % line + comments += "%s\n" % line + generated += "%s\n%s\n" % (header, comments) +print("%s%s%s" % (generated, copyright, emacsinfo)) -- 2.11.0