changeset 299:a437bbc507a9

Fix codingstyle for pep8
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 11 Oct 2013 09:39:11 +0200
parents 7306ef85079c
children b5b3545ee1ea
files getan/view.py
diffstat 1 files changed, 17 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- 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):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)