[Getan-commits] [PATCH 16 of 32] Fix codingstyle for pep8

Wald Commits scm-commit at wald.intevation.org
Fri Oct 11 14:34:00 CEST 2013


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1381486002 -7200
# Node ID 349b4571e1209dc5ffae4f67c51b0721635bbdd5
# Parent  2667bdef021f02acd976e60315a1dce24b8d58a4
Fix codingstyle for pep8

diff -r 2667bdef021f -r 349b4571e120 getan/project.py
--- a/getan/project.py	Fri Oct 11 11:40:56 2013 +0200
+++ b/getan/project.py	Fri Oct 11 12:06:42 2013 +0200
@@ -12,20 +12,21 @@
 
 from datetime import datetime
 
+
 class Project(object):
 
     def __init__(self, id, key, desc, total):
-        self.id      = id
-        self.key     = key
-        self.desc    = desc
+        self.id = id
+        self.key = key
+        self.desc = desc
         self.entries = []
-        self.total   = total
-        self.start   = None
-        self.stop    = None
+        self.total = total
+        self.start = None
+        self.stop = None
 
     def year(self):
         total = 0
-        now   = datetime.now()
+        now = datetime.now()
         for entry in self.entries:
             start = entry.start
             if start.year == now.year:
@@ -34,7 +35,7 @@
 
     def month(self):
         total = 0
-        now   = datetime.now()
+        now = datetime.now()
         for entry in self.entries:
             start = entry.start
             if start.month == now.month and start.year == now.year:
@@ -43,7 +44,7 @@
 
     def week(self):
         total = 0
-        now   = datetime.now()
+        now = datetime.now()
         tweek = now.strftime('%W')
         for entry in self.entries:
             start = entry.start
@@ -53,11 +54,11 @@
 
     def day(self):
         total = 0
-        now   = datetime.now()
+        now = datetime.now()
         for entry in self.entries:
             start = entry.start
             if start.month == now.month and start.year == now.year \
-                    and start.day  == now.day:
+                    and start.day == now.day:
                 total += (entry.end - start).seconds
         return total
 
@@ -65,11 +66,11 @@
 class Entry(object):
 
     def __init__(self, id, project_id, start, end, desc):
-        self.id         = id
+        self.id = id
         self.project_id = project_id
-        self.start      = start
-        self.end        = end
-        self.desc       = desc
+        self.start = start
+        self.end = end
+        self.desc = desc
 
         # carefully handle non unicode string
         # urwid seems to have some issue with plain str


More information about the Getan-commits mailing list