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

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


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1381477151 -7200
# Node ID a437bbc507a98dbee0f220fb2661859e7246a6db
# Parent  7306ef85079c7bac02289931de6eb59a0c22442b
Fix codingstyle for pep8

diff -r 7306ef85079c -r a437bbc507a9 getan/view.py
--- a/getan/view.py	Fri Oct 11 09:38:58 2013 +0200
+++ b/getan/view.py	Fri Oct 11 09:39:11 2013 +0200
@@ -22,6 +22,7 @@
 
 logger = logging.getLogger()
 
+
 class ListWidget(urwid.BoxWidget):
 
     node_class = None
@@ -141,10 +142,10 @@
 class ProjectList(ListWidget):
 
     PROJECT_MODES = {
-            0: "id",
-            1: "key",
-            2: "desc",
-            3: "tree",
+        0: "id",
+        1: "key",
+        2: "desc",
+        3: "tree",
     }
 
     node_class = ProjectNode
@@ -179,8 +180,8 @@
             self.rows = self.create_project_list()
 
     def create_project_list(self):
-        return [ProjectNode(x) for x in sorted(self.raw_rows,
-            key=lambda row: self._get_project_sort_key(row))]
+        return [ProjectNode(x) for x in sorted(
+            self.raw_rows, key=lambda row: self._get_project_sort_key(row))]
 
     def create_project_tree(self):
         # create a simple one child tree until now
@@ -225,7 +226,8 @@
         if not self.rows:
             self.set_footer_text("", "project_footer")
             return
-        logger.debug("ProjectList: reset_footer to '%s'" % self._footer_info[0])
+        logger.debug("ProjectList: reset_footer to '%s'" %
+                     self._footer_info[0])
         self.set_footer_text(*self._footer_info)
 
     def switch_time_mode(self):
@@ -306,20 +308,21 @@
         self.proj_list = proj_list
         self.entr_list = entr_list
         self.columns = urwid.Columns([
-            urwid.Padding(self.proj_list, ('fixed left',0),('fixed right',1)),
+            urwid.Padding(
+                self.proj_list, ('fixed left', 0), ('fixed right', 1)),
             self.entr_list], 0)
 
         getan_header = urwid.AttrWrap(urwid.Text('%s' % _('.: getan :.')),
                                       'header')
-        version_header = urwid.AttrWrap(urwid.Text("Version %s" % \
-                getan.__version__, align="right"), "header")
+        version_header = urwid.AttrWrap(urwid.Text(
+            "Version %s" % getan.__version__, align="right"), "header")
 
         self.header = urwid.Columns([getan_header, version_header])
         self.footer = urwid.AttrWrap(urwid.Text(_('Choose a project:')),
-                                       'question')
+                                     'question')
         self.col_list = self.columns.widget_list
         view = urwid.AttrWrap(self.columns, 'body')
-        self.frame = urwid.Frame(view, header=self.header,footer=self.footer)
+        self.frame = urwid.Frame(view, header=self.header, footer=self.footer)
         self._w = self.frame
 
     def get_frame(self):
@@ -332,7 +335,7 @@
             self.frame.set_focus("footer")
         else:
             logger.debug("GetanView: set footer text: '%s'" % text)
-            self.frame.set_footer(urwid.AttrWrap(urwid.Text(text),attr))
+            self.frame.set_footer(urwid.AttrWrap(urwid.Text(text), attr))
 
     def get_palette(self):
         return self.palette
@@ -341,7 +344,7 @@
         self.controller.state.keypress(size, key)
 
     def mouse_event(self, size, event, button, col, row, focus):
-        #TODO currently ignore mouse events
+        # TODO currently ignore mouse events
         return True
 
     def update_entries(self, entries):


More information about the Getan-commits mailing list