[Getan-commits] [PATCH 02 of 16] Fix coding style for pep8

Wald Commits scm-commit at wald.intevation.org
Mon Mar 3 15:00:33 CET 2014


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1393842871 -3600
# Node ID 3a17869476731251c0179f07fcf8ec3cf5f4e7e6
# Parent  3a80a914a0245af0dfe1e8bf2490306b259dde06
Fix coding style for pep8

diff -r 3a80a914a024 -r 3a1786947673 getan/contrib/getan-eval.py
--- a/getan/contrib/getan-eval.py	Mon Mar 03 10:45:15 2014 +0100
+++ b/getan/contrib/getan-eval.py	Mon Mar 03 11:34:31 2014 +0100
@@ -20,6 +20,7 @@
 
 DEFAULT_DATABASE = "time.db"
 
+
 def tolerant_close(c):
     if c:
         try:
@@ -27,20 +28,21 @@
         except:
             pass
 
+
 def main():
     parser = OptionParser()
     parser.add_option("-d", "--database", dest="database",
-            help="getan database",  metavar="DATABASE")
+                      help="getan database",  metavar="DATABASE")
     parser.add_option("-t", "--template", dest="template", metavar="TEMPLATE",
-            help="name of getan template")
+                      help="name of getan template")
     parser.add_option("-u", "--user", dest="user", help="name of user")
     parser.add_option("-p", "--project", dest="project",
-        help="key of output project")
+                      help="key of output project")
     parser.add_option("-w", "--week", type="int", dest="week",
-            help="week of year")
+                      help="week of year")
     parser.add_option("-y", "--year", type="int", dest="year", help="year")
     parser.add_option("-c", "--lastweek", dest="entries of last working week",
-            action="store_true")
+                      action="store_true")
 
     (options, args) = parser.parse_args()
 
@@ -65,11 +67,10 @@
         year = int(date.today().strftime("%Y"))
 
     if week is None:
-        week = (datetime.now()-timedelta(7)).isocalendar()[1]
+        week = (datetime.now() - timedelta(7)).isocalendar()[1]
 
     u_week = "%02d" % unix_week(week, year)
 
-
     if not os.path.isfile(database):
         print >> sys.stderr, "'%s' does not exist or is not a file." % database
         sys.exit(1)


More information about the Getan-commits mailing list