Index: quintagroup.plonetabs/trunk/quintagroup/plonetabs/browser/plonetabs.py
===================================================================
--- quintagroup.plonetabs/trunk/quintagroup/plonetabs/browser/plonetabs.py	(revision 3607)
+++ quintagroup.plonetabs/trunk/quintagroup/plonetabs/browser/plonetabs.py	(revision 3608)
@@ -223,5 +223,6 @@
             self.moveAction(id, cat_name, steps=1)
             IStatusMessage(self.request).addStatusMessage(
-                _(u"'${id}' action moved up.", mapping={'id': id}), type="info")
+                _(u"'${id}' action moved up.", mapping={'id': id}),
+                type="info")
             self.redirect(search="category=%s" % cat_name)
             return False
@@ -687,5 +688,6 @@
                 self.kss_toggleCollapsible(
                     ksscore.getCssSelector('form[name=addaction_form] '
-                                           '.headerAdvanced'), collapse='false')
+                                           '.headerAdvanced'),
+                    collapse='false')
 
             message = _(u"Please correct the indicated errors.")
Index: quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_controlpanel.py
===================================================================
--- quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_controlpanel.py	(revision 3607)
+++ quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_controlpanel.py	(revision 3608)
@@ -11,5 +11,5 @@
 from quintagroup.plonetabs.browser.interfaces import IPloneTabsControlPanel
 from quintagroup.plonetabs.browser.plonetabs \
-                                      import PloneTabsControlPanel as ptp
+    import PloneTabsControlPanel as ptp
 from quintagroup.plonetabs.tests.base import PloneTabsTestCase
 from quintagroup.plonetabs.tests.data import PORTAL_ACTIONS
@@ -22,5 +22,5 @@
         self.loginAsPortalOwner()
         panel = getMultiAdapter((self.portal, self.portal.REQUEST),
-            name='plonetabs-controlpanel')
+                                name='plonetabs-controlpanel')
         # we need this to apply zope2 security (got from zope2 traverse method)
         self.panel = panel.__of__(self.portal)
@@ -31,15 +31,15 @@
         method = self.panel.redirect
         portal_url = getMultiAdapter((self.portal, self.portal.REQUEST),
-                                      name=u"plone_portal_state").portal_url()
+                                     name=u"plone_portal_state").portal_url()
         url = '%s/@@plonetabs-controlpanel' % portal_url
         method()
         self.assertEquals(response.headers.get('location', ''), url,
-            'Redirect method is not working properly.')
+                          'Redirect method is not working properly.')
 
         # check query string and anchor hash
         method('http://quintagroup.com', 'q=test', 'hash_code')
         self.assertEquals(response.headers.get('location', ''),
-            'http://quintagroup.com?q=test#hash_code',
-            'Redirect method is not working properly.')
+                          'http://quintagroup.com?q=test#hash_code',
+                          'Redirect method is not working properly.')
 
     def test_fixExpression(self):
@@ -47,5 +47,5 @@
         self.assertEquals(method('/slash'), 'string:${portal_url}/slash')
         self.assertEquals(method('https://test.com'),
-                                 'string:https://test.com')
+                          'string:https://test.com')
         self.assertEquals(method('python:True'), 'python:True')
         self.assertEquals(method('hello'), 'string:${object_url}/hello')
@@ -64,5 +64,5 @@
         errors = method('new_category', good_data)
         self.assertEquals(errors, {},
-            'There should be no errors for valid data.')
+                          'There should be no errors for valid data.')
 
         bad_data = {'id': '',
@@ -88,5 +88,6 @@
 
         self.assertEquals(len(errors.keys()), 4,
-            'validateActionFields method is not working properly.')
+                          'validateActionFields method is not working '
+                          'properly.')
         #### pyflakes.scripts.pyflakes ends.
 
@@ -95,8 +96,8 @@
         errors = {'error': 'error message'}
         self.assertEquals(method(errors), errors,
-            'processErrors method is not working properly.')
+                          'processErrors method is not working properly.')
         self.assertEquals(method(errors, 'pre_', '_post'),
-            {'pre_error_post': 'error message'},
-            'processErrors method is not working properly.')
+                          {'pre_error_post': 'error message'},
+                          'processErrors method is not working properly.')
 
     def test_parseEditForm(self):
@@ -110,10 +111,10 @@
                 'available_expr_id1': 'expr2'}
         self.assertEquals(method(form),
-            ('id1', 'cat1', {'id': 'id_new',
-                             'title': 'title1',
-                             'url_expr': 'expr1',
-                             'available_expr': 'expr2',
-                             'visible': True}),
-            'parseEditForm method is not working properly.')
+                          ('id1', 'cat1', {'id': 'id_new',
+                                           'title': 'title1',
+                                           'url_expr': 'expr1',
+                                           'available_expr': 'expr2',
+                                           'visible': True}),
+                          'parseEditForm method is not working properly.')
 
         del form['orig_id']
@@ -129,10 +130,10 @@
                 'available_expr': 'expr2'}
         self.assertEquals(method(form),
-            ('id1', 'cat1', {'id': 'id1',
-                             'visible': True,
-                             'title': 'title1',
-                             'url_expr': 'string:expr1',
-                             'available_expr': 'expr2'}),
-            'parseAddForm method is not working properly.')
+                          ('id1', 'cat1', {'id': 'id1',
+                                           'visible': True,
+                                           'title': 'title1',
+                                           'url_expr': 'string:expr1',
+                                           'available_expr': 'expr2'}),
+                          'parseAddForm method is not working properly.')
 
         del form['id']
@@ -146,5 +147,5 @@
         self.setupActions(self.tool)
         self.assertEquals(method('portal_tabs').id, 'portal_tabs',
-            'getActionCategory is not working properly.')
+                          'getActionCategory is not working properly.')
 
     def test_getOrCreateCategory(self):
@@ -152,5 +153,5 @@
         self.purgeActions()
         self.assertEquals(method('portal_tabs').id, 'portal_tabs',
-            'getOrCreateCategory is not working properly.')
+                          'getOrCreateCategory is not working properly.')
 
     def test_setSiteProperties(self):
@@ -158,5 +159,5 @@
         sp = getToolByName(self.portal, 'portal_properties').site_properties
         self.assertEquals(sp.getProperty('title'), 'Test Title',
-            'setSiteProperties method is not working properly.')
+                          'setSiteProperties method is not working properly.')
 
     def test_renderViewlet(self):
@@ -195,5 +196,5 @@
         self.panel.addAction('new_category', {'id': 'id1', 'title': 'Test'})
         self.failUnless('id1' in self.tool.new_category.objectIds(),
-            'addAction method is not workig properly')
+                        'addAction method is not workig properly')
 
     def test_updateAction(self):
@@ -210,5 +211,5 @@
         method('home', 'portal_tabs', {'id': 'new_home'})
         self.failUnless('new_home' in self.tool.portal_tabs.objectIds(),
-            'updateAction method is not workig properly')
+                        'updateAction method is not workig properly')
 
     def test_deleteAction(self):
@@ -217,5 +218,5 @@
         self.panel.deleteAction('home', 'portal_tabs')
         self.failIf('home' in self.tool.portal_tabs.objectIds(),
-             'deleteAction method is not workig properly')
+                    'deleteAction method is not workig properly')
 
     def test_moveAction(self):
@@ -224,8 +225,8 @@
         pos = self.tool.portal_tabs.getObjectPosition
         self.assertEquals(pos('home'), 0,
-            'moveAction method is not workig properly')
+                          'moveAction method is not workig properly')
         self.panel.moveAction('home', 'portal_tabs', -1)
         self.assertEquals(pos('home'), 1,
-             'moveAction method is not workig properly')
+                          'moveAction method is not workig properly')
 
 
@@ -237,5 +238,5 @@
         self.loginAsPortalOwner()
         panel = getMultiAdapter((self.portal, self.portal.REQUEST),
-            name='plonetabs-controlpanel')
+                                name='plonetabs-controlpanel')
         # we need this to apply zope2 security (got from zope2 traverse method)
         self.panel = panel.__of__(self.portal)
@@ -244,16 +245,18 @@
     def test_interface(self):
         self.failUnless(IPloneTabsControlPanel.implementedBy(ptp),
-            'PloneTabs control panel does not implement required interface.')
+                        'PloneTabs control panel does not implement '
+                        'required interface.')
         self.failUnless(verifyClass(IPloneTabsControlPanel, ptp),
-            'PloneTabs control panel does not implement required interface.')
+                        'PloneTabs control panel does not implement '
+                        'required interface.')
 
     def test_getPageTitle(self):
         self.assertEquals(self.panel.getPageTitle(),
-            _(u"Portal Tabs Configuration"),
-            'getPageTitle method is broken')
+                          _(u"Portal Tabs Configuration"),
+                          'getPageTitle method is broken')
         self.assertEquals(self.panel.getPageTitle(category='notexists'),
-            _(u"Plone '${cat_name}' Configuration",
-              mapping={'cat_name': 'notexists'}),
-            'getPageTitle method is broken')
+                          _(u"Plone '${cat_name}' Configuration",
+                            mapping={'cat_name': 'notexists'}),
+                          'getPageTitle method is broken')
 
     def test_hasActions(self):
@@ -262,10 +265,10 @@
         self.purgeActions()
         self.failIf(method(),
-            'There should be no portal_tab actions in portal')
+                    'There should be no portal_tab actions in portal')
 
         # setup our own actions
         self.setupActions(self.tool)
         self.failUnless(method(),
-            'There should be portal_tab actions in portal')
+                        'There should be portal_tab actions in portal')
 
     def test_getPortalActions(self):
@@ -273,15 +276,16 @@
         # purge any default portal actions
         self.purgeActions()
-        self.assertEquals(len(method()), 0,
-            'There should be no actions in portal_tabs category.')
+        self.assertEquals(len(method()), 0, 'There should be no actions in '
+                          'portal_tabs category.')
 
         # setup our own actions
         self.setupActions(self.tool)
         self.assertEquals(len(method()), 2,
-            'There should be 2 actions in portal_tabs category.')
+                          'There should be 2 actions in portal_tabs category.')
 
         # marginal arguments
         self.assertEquals(len(method('notexistent_category')), 0,
-            'There should be no actions for not existed category.')
+                          'There should be no actions for not existed '
+                          'category.')
 
     def test_isGeneratedTabs(self):
@@ -304,17 +308,17 @@
         self.purgeActions()
         self.failIf('class="editform"' in method(),
-            'There should no be actions in actions list template.')
+                    'There should no be actions in actions list template.')
         self.setupActions(self.tool)
         self.failUnless('class="editform"' in method(),
-            'There are no actions in actions list template.')
+                        'There are no actions in actions list template.')
 
     def test_getAutoGenereatedSection(self):
         method = self.panel.getAutoGenereatedSection
         self.failIf('<form' in method('user'),
-            'There should be no form in autogenerated tabs template '
-            'for category other than portal_tabs.')
+                    'There should be no form in autogenerated tabs template '
+                    'for category other than portal_tabs.')
         self.failUnless('<form' in method('portal_tabs'),
-            'There should be form in autogenerated tabs template '
-            'for portal_tabs category.')
+                        'There should be form in autogenerated tabs template '
+                        'for portal_tabs category.')
 
     def test_getGeneratedTabs(self):
@@ -331,10 +335,10 @@
         self.purgeContent()
         self.assertEquals(len(method()), 0,
-            'There should be no root elements for navigation.')
+                          'There should be no root elements for navigation.')
 
         # now add some testing content
         self.setupContent(self.portal)
-        self.assertEquals(len(method()), 2,
-            'There should be 2 elements in portal root for navigation.')
+        self.assertEquals(len(method()), 2, 'There should be 2 elements in '
+                          'portal root for navigation.')
 
         # now switch off autogeneration
@@ -342,6 +346,6 @@
         sp.manage_changeProperties(disable_folder_sections=True)
         self.assertEquals(len(method()), 0,
-            'There should be no root elements for navigation when '
-            'tabs autogeneration is switched off.')
+                          'There should be no root elements for navigation '
+                          'when tabs autogeneration is switched off.')
 
     def test_getCategories(self):
@@ -349,11 +353,12 @@
         # purge any default portal actions
         self.purgeActions()
-        self.assertEquals(len(method()), 0,
-            'There should be no categories in portal_actions tool.')
+        self.assertEquals(len(method()), 0, 'There should be no categories '
+                          'in portal_actions tool.')
 
         # now setup actions
         self.setupActions(self.tool)
         self.assertEquals(method(), ['portal_tabs', 'new_category'],
-            'There should be exactly 2 categories in portal_actions tool.')
+                          'There should be exactly 2 categories in '
+                          'portal_actions tool.')
 
     def test_portal_tabs(self):
@@ -362,5 +367,5 @@
         self.purgeActions()
         self.assertEquals(len(method()), 0,
-            'There should be no portal tabs.')
+                          'There should be no portal tabs.')
 
         # cleanup memoize cache
@@ -372,18 +377,19 @@
         self.setupActions(self.tool)
         self.assertEquals(len(method()), 2,
-            'There should be 2 portal tabs.')
+                          'There should be 2 portal tabs.')
 
         # add content
         self.setupContent(self.portal)
         self.assertEquals(len(method()), 4,
-            'There should be 4 portal tabs.')
+                          'There should be 4 portal tabs.')
 
     def test_selected_portal_tab(self):
         self.assertEquals(self.panel.selected_portal_tab(), 'index_html',
-            'index_html is not selected tab while being on configlet.')
+                          'index_html is not selected tab while being on '
+                          'configlet.')
 
     def test_test(self):
         self.assertEquals(self.panel.test(True, 'true', 'false'), 'true',
-            'Test function does not work properly.')
+                          'Test function does not work properly.')
 
 
@@ -395,5 +401,5 @@
         self.loginAsPortalOwner()
         panel = getMultiAdapter((self.portal, self.portal.REQUEST),
-            name='plonetabs-controlpanel')
+                                name='plonetabs-controlpanel')
         # we need this to apply zope2 security (got from zope2 traverse method)
         self.panel = panel.__of__(self.portal)
@@ -426,5 +432,5 @@
         self.failUnless('id1' in self.tool.cat1.objectIds())
         self.failIf(postback,
-            'There should be redirect after successfull adding.')
+                    'There should be redirect after successfull adding.')
 
     def test_manage_editAction(self):
@@ -445,5 +451,5 @@
         self.failUnless('id_new' in self.tool.portal_tabs.objectIds())
         self.failIf(postback,
-            'There should be redirect after successfull edition.')
+                    'There should be redirect after successfull edition.')
 
         form['category'] = 'non_existent'
Index: quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_erase.py
===================================================================
--- quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_erase.py	(revision 3607)
+++ quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_erase.py	(revision 3608)
@@ -9,9 +9,9 @@
 try:
     # Plone < 4.3
-    from zope.app.component import hooks 
+    from zope.app.component import hooks
     setSite = hooks.setSite
     setHooks = hooks.setHooks
 except ImportError:
-    # Plone >= 4.3 
+    # Plone >= 4.3
     from zope.component.hooks import setSite, setHooks
 
@@ -61,12 +61,12 @@
         tool = getToolByName(self.portal, 'portal_actionicons')
         icon_ids = [i._action_id for i in tool.listActionIcons()]
-        self.failIf('plonetabs' in icon_ids,
-            'There should be no plonetabs action icon after uninstall.')
+        self.failIf('plonetabs' in icon_ids, 'There should be no plonetabs '
+                    'action icon after uninstall.')
 
     def test_controlPanel(self):
         tool = getToolByName(self.portal, 'portal_controlpanel')
         action_ids = [a.id for a in tool.listActions()]
-        self.failIf('plonetabs' in action_ids,
-            'There should be no plonetabs configlet after after uninstall.')
+        self.failIf('plonetabs' in action_ids, 'There should be no plonetabs '
+                    'configlet after after uninstall.')
 
     def test_cssRegistry(self):
@@ -74,6 +74,6 @@
         css = tool.getResource('++resource++plonetabs.css')
         self.failUnless(css is None,
-            'There should be no ++resource++plonetabs.css stylesheets after'
-            ' uninstall.')
+                        'There should be no ++resource++plonetabs.css '
+                        'stylesheets after uninstall.')
 
     def test_jsRegistry(self):
@@ -82,11 +82,11 @@
         effects = tool.getResource('++resource++pt_effects.js')
         self.failUnless(effects is None,
-            'There should be no ++resource++pt_effects.js script after'
-            ' uninstall.')
+                        'There should be no ++resource++pt_effects.js script '
+                        'after uninstall.')
 
         dad = tool.getResource('++resource++sa_dragdrop.js')
         self.failUnless(dad is None,
-            'There should be no ++resource++sa_dragdrop.js script after'
-            ' uninstall.')
+                        'There should be no ++resource++sa_dragdrop.js script '
+                        'after uninstall.')
 
     def test_kssRegistry(self):
@@ -94,28 +94,29 @@
         kss = tool.getResource('++resource++plonetabs.kss')
         self.failUnless(kss is None,
-            'There should be no ++resource++plonetabs.kss sheets after'
-            ' uninstall.')
+                        'There should be no ++resource++plonetabs.kss sheets '
+                        'after uninstall.')
         kss = tool.getResource('++resource++plonetabsmode.kss')
         self.failUnless(kss is None,
-            'There should be no ++resource++plonetabsmode.kss sheets after'
-            ' uninstall.')
+                        'There should be no ++resource++plonetabsmode.kss '
+                        'sheets after uninstall.')
 
     def test_propertiesTool(self):
         tool = getToolByName(self.portal, 'portal_properties')
         self.failUnless(hasattr(tool, 'tabs_properties'),
-            'There is no tabs_properties sheet in portal properties tool'
-            ' after uninstall.')
+                        'There is no tabs_properties sheet in portal '
+                        'properties tool after uninstall.')
         titles = tool.tabs_properties.getProperty('titles', None)
         self.assertEquals(titles,
-            ('portal_tabs|Portal Tabs Configuration',
-             'portal_footer|Portal Footer Configuration'),
-            'titles plonetabs property was erased from portal_properties'
-            ' after uninstall.'
-        )
+                          ('portal_tabs|Portal Tabs Configuration',
+                           'portal_footer|Portal Footer Configuration'),
+                          'titles plonetabs property was erased from '
+                          'portal_properties after uninstall.'
+                          )
 
     def test_browserLayer(self):
         layers = [o.__name__ for o in registered_layers()]
         self.failIf('IPloneTabsProductLayer' in layers,
-            'There should be no quintagroup.plonetabs layer after uninstall.')
+                    'There should be no quintagroup.plonetabs layer after'
+                    ' uninstall.')
 
 
Index: quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_setup.py
===================================================================
--- quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_setup.py	(revision 3607)
+++ quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_setup.py	(revision 3608)
@@ -16,6 +16,6 @@
         tool = getToolByName(self.portal, 'portal_actionicons')
         icon_ids = [i._action_id for i in tool.listActionIcons()]
-        self.failUnless('plonetabs' in icon_ids,
-            'There is no plonetabs action icon in actionicons tool.')
+        self.failUnless('plonetabs' in icon_ids, 'There is no plonetabs action'
+                        'icon in actionicons tool.')
 
     def test_controlPanel(self):
@@ -23,11 +23,11 @@
         action_ids = [a.id for a in tool.listActions()]
         self.failUnless('plonetabs' in action_ids,
-            'There is no plonetabs action in control panel.')
+                        'There is no plonetabs action in control panel.')
 
     def test_cssRegistry(self):
         tool = getToolByName(self.portal, 'portal_css')
         css = tool.getResource('++resource++plonetabs.css')
-        self.failIf(css is None,
-            'There is no ++resource++plonetabs.css stylesheets registered.')
+        self.failIf(css is None, 'There is no ++resource++plonetabs.css '
+                    'stylesheets registered.')
 
     def test_jsRegistry(self):
@@ -36,15 +36,15 @@
         prototype = tool.getResource('++resource++prototype.js')
         self.failIf(prototype is None,
-            'There is no ++resource++prototype.js script registered.')
+                    'There is no ++resource++prototype.js script registered.')
         self.failUnless(prototype._data['enabled'],
-            '++resource++prototype.js script is disabled.')
+                        '++resource++prototype.js script is disabled.')
 
         effects = tool.getResource('++resource++pt_effects.js')
         self.failIf(effects is None,
-            'There is no ++resource++pt_effects.js script registered.')
+                    'There is no ++resource++pt_effects.js script registered.')
 
         dad = tool.getResource('++resource++sa_dragdrop.js')
-        self.failIf(dad is None,
-            'There is no ++resource++sa_dragdrop.js script registered.')
+        self.failIf(dad is None, 'There is no ++resource++sa_dragdrop.js '
+                    'script registered.')
 
     def test_kssRegistry(self):
@@ -52,24 +52,24 @@
         kss = tool.getResource('++resource++plonetabs.kss')
         self.failIf(kss is None,
-            'There is no ++resource++plonetabs.kss sheets registered.')
+                    'There is no ++resource++plonetabs.kss sheets registered.')
         kss = tool.getResource('++resource++plonetabsmode.kss')
-        self.failIf(kss is None,
-            'There is no ++resource++plonetabsmode.kss sheets registered.')
+        self.failIf(kss is None, 'There is no ++resource++plonetabsmode.kss '
+                    'sheets registered.')
 
     def test_propertiesTool(self):
         tool = getToolByName(self.portal, 'portal_properties')
-        self.failUnless(hasattr(tool, 'tabs_properties'),
-            'There is no tabs_properties sheet in portal properties tool.')
+        self.failUnless(hasattr(tool, 'tabs_properties'), 'There is no '
+                        'tabs_properties sheet in portal properties tool.')
         titles = tool.tabs_properties.getProperty('titles', None)
         self.assertEquals(titles,
-            ('portal_tabs|Portal Tabs Configuration',
-             'portal_footer|Portal Footer Configuration'),
-            'Site properties was not setup properly'
-        )
+                          ('portal_tabs|Portal Tabs Configuration',
+                           'portal_footer|Portal Footer Configuration'),
+                          'Site properties was not setup properly'
+                          )
 
     def test_browserLayerRegistered(self):
         layers = [o.__name__ for o in registered_layers()]
-        self.failUnless('IPloneTabsProductLayer' in layers,
-            'There should be quintagroup.ploentabs browser layer registered.')
+        self.failUnless('IPloneTabsProductLayer' in layers, 'There should be '
+                        'quintagroup.ploentabs browser layer registered.')
 
 
Index: quintagroup.plonetabs/trunk/quintagroup/plonetabs/utils.py
===================================================================
--- quintagroup.plonetabs/trunk/quintagroup/plonetabs/utils.py	(revision 3607)
+++ quintagroup.plonetabs/trunk/quintagroup/plonetabs/utils.py	(revision 3608)
@@ -8,6 +8,7 @@
 
 
-# TODO: Methods 'getViewletByName' and 'setupViewletByName' were copied
-# from https://github.com/collective/collective.developermanual/blob/master/source/views/viewlets.rst#rendering-viewlet-by-name
+# TODO: Methods 'getViewletByName' and 'setupViewletByName' were copied from
+# https://github.com/collective/collective.developermanual/blob/master/source/
+#                                 views/viewlets.rst#rendering-viewlet-by-name
 # Better solution would be to use collective.fastview
 # (http://svn.plone.org/svn/collective/collective.fastview/trunk/)
@@ -27,6 +28,6 @@
 
         if v.provided == IViewlet:
-            # Note that we might have conflicting BrowserView with the same name,
-            # thus we need to check for provided
+            # Note that we might have conflicting BrowserView with the
+            # same name, thus we need to check for provided
             if v.name == name:
                 return v
@@ -59,5 +60,6 @@
     except TypeError:
         # Bad constructor call parameters
-        raise RuntimeError("Unable to initialize viewlet %s. Factory method %s call failed." % (name, str(factory)))
+        raise RuntimeError("Unable to initialize viewlet %s. Factory "
+                           "method %s call failed." % (name, str(factory)))
 
     return viewlet
