Repository: Products.CMFPlone
Branch: refs/heads/master
Date: 2014-11-14T10:58:39+01:00
Author: Johannes Raggam (thet) <raggam-nl@adm.at>
Commit: https://github.com/plone/Products.CMFPlone/commit/c931894321331e2d9ab571d8ca64bcbd801cbb52

pep8 all controlpanel stuff

Files changed:
M Products/CMFPlone/controlpanel/bbb/editing.py
M Products/CMFPlone/controlpanel/bbb/maintenance.py
M Products/CMFPlone/controlpanel/bbb/navigation.py
M Products/CMFPlone/controlpanel/bbb/search.py
M Products/CMFPlone/controlpanel/bbb/site.py
M Products/CMFPlone/controlpanel/browser/maintenance.py
M Products/CMFPlone/controlpanel/browser/navigation.py
M Products/CMFPlone/controlpanel/browser/resourceregistry.py
M Products/CMFPlone/controlpanel/browser/tinymce.py
M Products/CMFPlone/controlpanel/events.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_navigation_adapter.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_search_adapter.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_site_adapter.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_editing.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_maintenance.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_navigation.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_search.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_site.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_types.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_doctest.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_editing.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_navigation.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_search.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_site.py
M Products/CMFPlone/controlpanel/tests/test_controlpanel_types.py
M Products/CMFPlone/controlpanel/widgets.py
M Products/CMFPlone/interfaces/__init__.py

diff --git a/Products/CMFPlone/controlpanel/bbb/editing.py b/Products/CMFPlone/controlpanel/bbb/editing.py
index d595d33..5ebdc10 100644
--- a/Products/CMFPlone/controlpanel/bbb/editing.py
+++ b/Products/CMFPlone/controlpanel/bbb/editing.py
@@ -1,13 +1,9 @@
+from Products.CMFPlone.interfaces import IEditingSchema
+from Products.CMFPlone.interfaces import IPloneSiteRoot
+from plone.registry.interfaces import IRegistry
 from zope.component import adapts
-from Products.CMFDefault.formlib.schema import ProxyFieldProperty
-from zope.interface import implements
-from zope.site.hooks import getSite
 from zope.component import getUtility
-from plone.registry.interfaces import IRegistry
-from Products.CMFCore.utils import getToolByName
-from Products.CMFPlone.interfaces import IPloneSiteRoot
-
-from Products.CMFPlone.interfaces import IEditingSchema
+from zope.interface import implements
 
 
 class EditingControlPanelAdapter(object):
diff --git a/Products/CMFPlone/controlpanel/bbb/maintenance.py b/Products/CMFPlone/controlpanel/bbb/maintenance.py
index 3b8423d..184726e 100644
--- a/Products/CMFPlone/controlpanel/bbb/maintenance.py
+++ b/Products/CMFPlone/controlpanel/bbb/maintenance.py
@@ -1,10 +1,9 @@
 from Products.CMFPlone.interfaces import IMaintenanceSchema
-from Products.CMFCore.utils import getToolByName
+from Products.CMFPlone.interfaces import IPloneSiteRoot
+from plone.registry.interfaces import IRegistry
 from zope.component import adapts
 from zope.component import getUtility
 from zope.interface import implements
-from plone.registry.interfaces import IRegistry
-from Products.CMFPlone.interfaces import IPloneSiteRoot
 
 
 class MaintenanceControlPanelAdapter(object):
diff --git a/Products/CMFPlone/controlpanel/bbb/navigation.py b/Products/CMFPlone/controlpanel/bbb/navigation.py
index 7c01444..410a533 100644
--- a/Products/CMFPlone/controlpanel/bbb/navigation.py
+++ b/Products/CMFPlone/controlpanel/bbb/navigation.py
@@ -1,11 +1,10 @@
 # -*- coding: utf-8 -*-
-from zope.component import adapts
 from Products.CMFPlone.interfaces import INavigationSchema
-from zope.interface import implements
-from zope.component import getUtility
 from Products.CMFPlone.interfaces import IPloneSiteRoot
-
 from plone.registry.interfaces import IRegistry
+from zope.component import adapts
+from zope.component import getUtility
+from zope.interface import implements
 
 
 class NavigationControlPanelAdapter(object):
diff --git a/Products/CMFPlone/controlpanel/bbb/search.py b/Products/CMFPlone/controlpanel/bbb/search.py
index a697cd1..d6c4eb8 100644
--- a/Products/CMFPlone/controlpanel/bbb/search.py
+++ b/Products/CMFPlone/controlpanel/bbb/search.py
@@ -1,12 +1,12 @@
 # -*- coding: utf-8 -*-
-from zope.site.hooks import getSite
+from Products.CMFCore.utils import getToolByName
+from Products.CMFPlone.interfaces import ISearchSchema
 from Products.CMFPlone.interfaces.siteroot import IPloneSiteRoot
+from plone.registry.interfaces import IRegistry
 from zope.component import adapts
-from zope.interface import implements
-from Products.CMFPlone.interfaces import ISearchSchema
-from Products.CMFCore.utils import getToolByName
 from zope.component import getUtility
-from plone.registry.interfaces import IRegistry
+from zope.interface import implements
+from zope.site.hooks import getSite
 
 
 class SearchControlPanelAdapter(object):
@@ -27,10 +27,10 @@ def get_enable_livesearch(self):
     def set_enable_livesearch(self, value):
         if value:
             self.search_settings.enable_livesearch = True
-            #self.jstool.getResource('livesearch.js').setEnabled(True)
+            # self.jstool.getResource('livesearch.js').setEnabled(True)
         else:
             self.search_settings.enable_livesearch = False
-            #self.jstool.getResource('livesearch.js').setEnabled(False)
+            # self.jstool.getResource('livesearch.js').setEnabled(False)
         self.jstool.cookResources()
 
     enable_livesearch = property(get_enable_livesearch, set_enable_livesearch)
diff --git a/Products/CMFPlone/controlpanel/bbb/site.py b/Products/CMFPlone/controlpanel/bbb/site.py
index c1efd7d..834b921 100644
--- a/Products/CMFPlone/controlpanel/bbb/site.py
+++ b/Products/CMFPlone/controlpanel/bbb/site.py
@@ -1,13 +1,10 @@
 # -*- coding: utf-8 -*-
 from Products.CMFDefault.formlib.schema import ProxyFieldProperty
 from Products.CMFPlone.interfaces import IPloneSiteRoot
-
 from Products.CMFPlone.interfaces import ISiteSchema
-
+from plone.registry.interfaces import IRegistry
 from zope.component import adapts
 from zope.component import getUtility
-from plone.registry.interfaces import IRegistry
-
 from zope.interface import implements
 
 
diff --git a/Products/CMFPlone/controlpanel/browser/maintenance.py b/Products/CMFPlone/controlpanel/browser/maintenance.py
index 223f610..83c767a 100644
--- a/Products/CMFPlone/controlpanel/browser/maintenance.py
+++ b/Products/CMFPlone/controlpanel/browser/maintenance.py
@@ -1,22 +1,16 @@
-from z3c.form import button
-import os
-from cgi import escape
-
-from plone.app.form.validators import null_validator
-from z3c.form import form
-
 from AccessControl import getSecurityManager
 from AccessControl.Permissions import view_management_screens
 from Acquisition import aq_inner
 from Products.CMFCore.utils import getToolByName
 from Products.CMFPlone import PloneMessageFactory as _
+from Products.CMFPlone.interfaces import IMaintenanceSchema
 from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
-
-from plone.protect import CheckAuthenticator
-
+from cgi import escape
 from plone.autoform.form import AutoExtensibleForm
-
-from Products.CMFPlone.interfaces import IMaintenanceSchema
+from plone.protect import CheckAuthenticator
+from z3c.form import button
+from z3c.form import form
+import os
 
 
 class MaintenanceControlPanel(AutoExtensibleForm, form.EditForm):
diff --git a/Products/CMFPlone/controlpanel/browser/navigation.py b/Products/CMFPlone/controlpanel/browser/navigation.py
index 15293e6..d5e633b 100644
--- a/Products/CMFPlone/controlpanel/browser/navigation.py
+++ b/Products/CMFPlone/controlpanel/browser/navigation.py
@@ -1,10 +1,8 @@
 # -*- coding: utf-8 -*-
-from z3c.form.browser.checkbox import CheckBoxFieldWidget
-
 from Products.CMFPlone import PloneMessageFactory as _
 from Products.CMFPlone.interfaces import INavigationSchema
-
 from plone.app.registry.browser import controlpanel
+from z3c.form.browser.checkbox import CheckBoxFieldWidget
 
 
 class NavigationControlPanelForm(controlpanel.RegistryEditForm):
diff --git a/Products/CMFPlone/controlpanel/browser/resourceregistry.py b/Products/CMFPlone/controlpanel/browser/resourceregistry.py
index 8799be4..8b9b2e7 100644
--- a/Products/CMFPlone/controlpanel/browser/resourceregistry.py
+++ b/Products/CMFPlone/controlpanel/browser/resourceregistry.py
@@ -1,17 +1,15 @@
-import json
-from zope.component import getUtility
-from plone.registry.interfaces import IRegistry
-from Products.CMFPlone.interfaces import (
-    IBundleRegistry, IResourceRegistry,
-)
-from plone.resource.interfaces import IResourceDirectory
-from Products.CMFPlone.interfaces.resources import (
-    OVERRIDE_RESOURCE_DIRECTORY_NAME)
-from StringIO import StringIO
-from zExceptions import NotFound
+from Products.CMFPlone.interfaces import IBundleRegistry
+from Products.CMFPlone.interfaces import IResourceRegistry
+from Products.CMFPlone.interfaces.resources import OVERRIDE_RESOURCE_DIRECTORY_NAME  # noqa
 from Products.CMFPlone.resources.browser.configjs import RequireJsView
+from StringIO import StringIO
 from plone.memoize.view import memoize
+from plone.registry.interfaces import IRegistry
+from plone.resource.interfaces import IResourceDirectory
 from urlparse import urlparse
+from zExceptions import NotFound
+from zope.component import getUtility
+import json
 
 
 class JSONEncoder(json.JSONEncoder):
@@ -330,4 +328,4 @@ def config(self):
         for key, bundle in bundles.items():
             data['bundles'][key] = recordsToDict(bundle)
         data['overrides'] = self.get_overrides()
-        return json.dumps(data, cls=JSONEncoder)
\ No newline at end of file
+        return json.dumps(data, cls=JSONEncoder)
diff --git a/Products/CMFPlone/controlpanel/browser/tinymce.py b/Products/CMFPlone/controlpanel/browser/tinymce.py
index 268f704..f6bc360 100644
--- a/Products/CMFPlone/controlpanel/browser/tinymce.py
+++ b/Products/CMFPlone/controlpanel/browser/tinymce.py
@@ -1,14 +1,13 @@
-from plone.app.registry.browser import controlpanel
-
 from Products.CMFPlone import PloneMessageFactory as _
-from Products.CMFPlone.interfaces import ITinyMCESchema
-from Products.CMFPlone.interfaces import ITinyMCEPatternSchema
 from Products.CMFPlone.interfaces import ITinyMCELayoutSchema
-from Products.CMFPlone.interfaces import ITinyMCEToolbarSchema
 from Products.CMFPlone.interfaces import ITinyMCELibrariesSchema
+from Products.CMFPlone.interfaces import ITinyMCEPatternSchema
 from Products.CMFPlone.interfaces import ITinyMCEResourceTypesSchema
-from z3c.form import group
+from Products.CMFPlone.interfaces import ITinyMCESchema
+from Products.CMFPlone.interfaces import ITinyMCEToolbarSchema
+from plone.app.registry.browser import controlpanel
 from z3c.form import field
+from z3c.form import group
 
 
 class TinyMCEPatternForm(group.GroupForm):
diff --git a/Products/CMFPlone/controlpanel/events.py b/Products/CMFPlone/controlpanel/events.py
index 206ba47..14a7ee0 100644
--- a/Products/CMFPlone/controlpanel/events.py
+++ b/Products/CMFPlone/controlpanel/events.py
@@ -1,9 +1,9 @@
+from Products.CMFPlone.interfaces import IConfigurationChangedEvent
 from zope.component import adapter
 from zope.component import queryUtility
 from zope.interface import implements
 from zope.ramcache.interfaces.ram import IRAMCache
 
-from Products.CMFPlone.interfaces import IConfigurationChangedEvent
 
 class ConfigurationChangedEvent(object):
     implements(IConfigurationChangedEvent)
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py
index 917fc81..6ea1503 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_editing_adapter.py
@@ -1,14 +1,11 @@
-import unittest
+from Products.CMFPlone.interfaces import IEditingSchema
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
+from plone.app.testing import TEST_USER_ID
 from plone.app.testing import setRoles
+from plone.registry.interfaces import IRegistry
 from zope.component import getAdapter
 from zope.component import getUtility
-from plone.registry.interfaces import IRegistry
-from plone.app.testing import TEST_USER_ID
-
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_INTEGRATION_TESTING
-
-from Products.CMFPlone.interfaces import IEditingSchema
+import unittest
 
 
 class EditingControlPanelAdapterTest(unittest.TestCase):
@@ -49,12 +46,12 @@ def test_set_visible_ids(self):
 
     def test_get_enable_link_integrity_checks_setting(self):
         self.assertEqual(
-            getAdapter(self.portal, IEditingSchema).enable_link_integrity_checks,
+            getAdapter(self.portal, IEditingSchema).enable_link_integrity_checks,  # noqa
             True
         )
         self.settings.enable_link_integrity_checks = False
         self.assertEqual(
-            getAdapter(self.portal, IEditingSchema).enable_link_integrity_checks,
+            getAdapter(self.portal, IEditingSchema).enable_link_integrity_checks,  # noqa
             False
         )
 
@@ -63,7 +60,7 @@ def test_set_enable_link_integrity_checks_setting(self):
             self.settings.enable_link_integrity_checks,
             True
         )
-        getAdapter(self.portal, IEditingSchema).enable_link_integrity_checks = False
+        getAdapter(self.portal, IEditingSchema).enable_link_integrity_checks = False  # noqa
         self.assertEqual(
             self.settings.enable_link_integrity_checks,
             False
@@ -123,6 +120,7 @@ def test_get_lock_on_ttw_edit_setting(self):
             getAdapter(self.portal, IEditingSchema).lock_on_ttw_edit,
             False
         )
+
     def test_set_lock_on_ttw_edit_setting(self):
         self.assertEqual(
             self.settings.lock_on_ttw_edit,
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py
index 7a8d0a1..b8c7f22 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_maintenance_adapter.py
@@ -1,13 +1,11 @@
-import unittest
-from plone.app.testing import setRoles
 from Products.CMFPlone.interfaces import IMaintenanceSchema
-from zope.component import getAdapter
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
 from plone.app.testing import TEST_USER_ID
+from plone.app.testing import setRoles
 from plone.registry.interfaces import IRegistry
+from zope.component import getAdapter
 from zope.component import getUtility
-
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_INTEGRATION_TESTING
+import unittest
 
 
 class MaintenanceControlPanelAdapterTest(unittest.TestCase):
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_navigation_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_navigation_adapter.py
index 28b928c..78120a3 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_navigation_adapter.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_navigation_adapter.py
@@ -1,13 +1,10 @@
 # -*- coding: utf-8 -*-
 from Products.CMFPlone.interfaces import INavigationSchema
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_INTEGRATION_TESTING
-
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
 from plone.app.testing import TEST_USER_ID, setRoles
 from plone.registry.interfaces import IRegistry
-from zope.component import getUtility
 from zope.component import getAdapter
-
+from zope.component import getUtility
 import unittest2 as unittest
 
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_search_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_search_adapter.py
index 3e8a156..64c5274 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_search_adapter.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_search_adapter.py
@@ -1,12 +1,10 @@
 # -*- coding: utf-8 -*-
 from Products.CMFPlone.interfaces import ISearchSchema
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_INTEGRATION_TESTING
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
 from plone.app.testing import TEST_USER_ID, setRoles
 from plone.registry.interfaces import IRegistry
-from zope.component import getUtility
 from zope.component import getAdapter
-
+from zope.component import getUtility
 import unittest2 as unittest
 
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_site_adapter.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_site_adapter.py
index 88addb7..71a706c 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_site_adapter.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_bbb_site_adapter.py
@@ -1,15 +1,11 @@
 # -*- coding: utf-8 -*-
 from Products.CMFPlone.interfaces import ISiteSchema
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_INTEGRATION_TESTING
-
-from plone.app.testing import setRoles
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
 from plone.app.testing import TEST_USER_ID
+from plone.app.testing import setRoles
 from plone.registry.interfaces import IRegistry
-
 from zope.component import getAdapter
 from zope.component import getUtility
-
 import unittest
 
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_editing.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_editing.py
index b71f860..154c193 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_editing.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_editing.py
@@ -1,17 +1,14 @@
 # -*- coding: utf-8 -*-
-from zope.component import getUtility
-from plone.registry.interfaces import IRegistry
-from plone.app.testing import SITE_OWNER_PASSWORD
-from plone.app.testing import SITE_OWNER_NAME
-from plone.testing.z2 import Browser
 from Products.CMFPlone.interfaces import IEditingSchema
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
 from plone.app.linkintegrity.interfaces import ILinkIntegrityInfo
-
+from plone.app.testing import SITE_OWNER_NAME
+from plone.app.testing import SITE_OWNER_PASSWORD
+from plone.registry.interfaces import IRegistry
+from plone.testing.z2 import Browser
+from zope.component import getUtility
 import unittest2 as unittest
 
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
-
 
 class EditingControlPanelFunctionalTest(unittest.TestCase):
     """Test that changes in the editing control panel are actually
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_maintenance.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_maintenance.py
index 6289ce8..1e1ac26 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_maintenance.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_maintenance.py
@@ -1,11 +1,8 @@
 # -*- coding: utf-8 -*-
-from plone.app.testing import TEST_USER_PASSWORD
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
 from plone.app.testing import TEST_USER_NAME
+from plone.app.testing import TEST_USER_PASSWORD
 from plone.testing.z2 import Browser
-
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
-
 import unittest2 as unittest
 
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_navigation.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_navigation.py
index fb026b3..47599dc 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_navigation.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_navigation.py
@@ -1,15 +1,11 @@
 # -*- coding: utf-8 -*-
+from Products.CMFPlone.interfaces import INavigationSchema
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
 from plone.app.testing import SITE_OWNER_NAME, SITE_OWNER_PASSWORD
 from plone.registry.interfaces import IRegistry
 from plone.testing.z2 import Browser
-
 from zope.component import getMultiAdapter
 from zope.component import getUtility
-
-from Products.CMFPlone.interfaces import INavigationSchema
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
-
 import unittest2 as unittest
 
 
@@ -65,7 +61,7 @@ def test_generate_tabs(self):
         self.assertEqual(
             self.browser.getControl('Automatically generate tabs').selected,
             True
-            )
+        )
         self.browser.getControl('Automatically generate tabs').selected = False
         self.browser.getControl('Save').click()
 
@@ -80,7 +76,7 @@ def test_nonfolderish_tabs(self):
         self.assertEqual(
             self.browser.getControl('Automatically generate tabs').selected,
             True
-            )
+        )
         self.browser.getControl(
             'Generate tabs for items other than folders').selected = False
         self.browser.getControl('Save').click()
@@ -120,9 +116,9 @@ def test_workflow_settings(self):
             "%s/@@navigation-controlpanel" % self.portal_url)
 
         self.browser.getControl('Filter on workflow state').selected = True
-        self.browser.getControl('Externally visible [external]').selected = True
+        self.browser.getControl('Externally visible [external]').selected = True  # noqa
         self.browser.getControl('Internal draft [internal]').selected = True
-        self.browser.getControl('Internally published [internally_published]').selected = True
+        self.browser.getControl('Internally published [internally_published]').selected = True  # noqa
         self.browser.getControl('Pending [pending]').selected = True
         self.browser.getControl('Private [private]').selected = True
         self.browser.getControl('Public draft [visible]').selected = True
@@ -136,7 +132,7 @@ def test_workflow_settings(self):
 
         self.assertTrue('external' in settings.workflow_states_to_show)
         self.assertTrue('internal' in settings.workflow_states_to_show)
-        self.assertTrue('internally_published' in settings.workflow_states_to_show)
+        self.assertTrue('internally_published' in settings.workflow_states_to_show)  # noqa
         self.assertTrue('pending' in settings.workflow_states_to_show)
         self.assertTrue('private' in settings.workflow_states_to_show)
         self.assertTrue('visible' in settings.workflow_states_to_show)
@@ -149,7 +145,7 @@ def test_show_excluded_items(self):
             "%s/@@navigation-controlpanel" % self.portal_url)
 
         self.browser.getControl(
-            'Show items normally excluded from navigation if viewing their children.').selected = False
+            'Show items normally excluded from navigation if viewing their children.').selected = False  # noqa
         self.browser.getControl("Save").click()
 
         self.assertFalse(settings.show_excluded_items)
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_search.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_search.py
index ebed629..0d015bb 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_search.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_search.py
@@ -1,15 +1,11 @@
 # -*- coding: utf-8 -*-
+from Products.CMFPlone.interfaces import ISearchSchema
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
 from plone.app.testing import SITE_OWNER_NAME, SITE_OWNER_PASSWORD
 from plone.registry.interfaces import IRegistry
 from plone.testing.z2 import Browser
-
 from zope.component import getMultiAdapter
 from zope.component import getUtility
-
-from Products.CMFPlone.interfaces import ISearchSchema
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
-
 import unittest2 as unittest
 
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_site.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_site.py
index e2795ca..9c88b61 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_site.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_site.py
@@ -1,15 +1,11 @@
 # -*- coding: utf-8 -*-
+from Products.CMFPlone.interfaces import ISiteSchema
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
 from plone.app.testing import SITE_OWNER_NAME, SITE_OWNER_PASSWORD
 from plone.registry.interfaces import IRegistry
 from plone.testing.z2 import Browser
-
 from zope.component import getMultiAdapter
 from zope.component import getUtility
-
-from Products.CMFPlone.interfaces import ISiteSchema
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
-
 import unittest2 as unittest
 
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_types.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_types.py
index 582e339..3d40917 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_types.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_browser_types.py
@@ -1,10 +1,7 @@
 # -*- coding: utf-8 -*-
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
 from plone.app.testing import SITE_OWNER_NAME, SITE_OWNER_PASSWORD
 from plone.testing.z2 import Browser
-
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
-
 import unittest2 as unittest
 
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py
index 09b9ccb..14b7c18 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_dateandtime.py
@@ -2,7 +2,6 @@
 from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
 from plone.app.testing import TEST_USER_ID
 from plone.app.testing import setRoles
-
 import unittest2 as unittest
 
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_doctest.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_doctest.py
index 08b41ea..472554f 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_doctest.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_doctest.py
@@ -1,15 +1,11 @@
 # -*- coding: utf-8 -*-
 """Functional Doctests for control panel.
 """
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
+from plone.testing import layered
 import doctest
-
-import unittest2 as unittest
 import pprint
-
-from plone.testing import layered
-
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
+import unittest2 as unittest
 
 
 optionflags = (
@@ -24,11 +20,12 @@
 def test_suite():
     suite = unittest.TestSuite()
     suite.addTests([
-        layered(doctest.DocFileSuite(test,
-                                     optionflags=optionflags,
-                                     globs={'pprint': pprint.pprint,
-                                            }
-                                     ),
-                layer=PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING)
-        for test in normal_testfiles])
+        layered(
+            doctest.DocFileSuite(
+                test,
+                optionflags=optionflags,
+                globs={'pprint': pprint.pprint}
+            ),
+            layer=PRODUCTS_CMFPLONE_FUNCTIONAL_TESTING
+        ) for test in normal_testfiles])
     return suite
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_editing.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_editing.py
index 67a9d14..7efae9e 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_editing.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_editing.py
@@ -1,15 +1,11 @@
 # -*- coding: utf-8 -*-
+from Products.CMFCore.utils import getToolByName
 from Products.CMFPlone.interfaces import IEditingSchema
-import unittest2 as unittest
-
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
+from plone.registry.interfaces import IRegistry
 from zope.component import getMultiAdapter
 from zope.component import getUtility
-from plone.registry.interfaces import IRegistry
-
-from Products.CMFCore.utils import getToolByName
-
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_INTEGRATION_TESTING
+import unittest2 as unittest
 
 
 class EditingRegistryIntegrationTest(unittest.TestCase):
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_navigation.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_navigation.py
index e51dec4..bc7263e 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_navigation.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_navigation.py
@@ -1,18 +1,10 @@
 # -*- coding: utf-8 -*-
-from plone.registry import Registry
-from Products.CMFPlone.interfaces import IEditingSchema
-import unittest2 as unittest
-
-from zope.component import getMultiAdapter
-from zope.component import getUtility
-from plone.registry.interfaces import IRegistry
-
 from Products.CMFCore.utils import getToolByName
-
 from Products.CMFPlone.interfaces import INavigationSchema
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_INTEGRATION_TESTING
-
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
+from plone.registry.interfaces import IRegistry
+from zope.component import getMultiAdapter
+from zope.component import getUtility
 import unittest2 as unittest
 
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py
index 7a8a380..0f0abb3 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_overview.py
@@ -3,7 +3,6 @@
 from plone.app.testing import setRoles
 from plone.registry.interfaces import IRegistry
 from zope.component import getUtility
-
 import mock
 import unittest
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_search.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_search.py
index 735fc87..4cc2038 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_search.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_search.py
@@ -1,13 +1,10 @@
 # -*- coding: utf-8 -*-
-from zope.component import getMultiAdapter
-from zope.component import getUtility
-from plone.registry.interfaces import IRegistry
-
 from Products.CMFCore.utils import getToolByName
 from Products.CMFPlone.interfaces import ISearchSchema
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_INTEGRATION_TESTING
-
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
+from plone.registry.interfaces import IRegistry
+from zope.component import getMultiAdapter
+from zope.component import getUtility
 import unittest2 as unittest
 
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_site.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_site.py
index eec8aef..2b36b61 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_site.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_site.py
@@ -1,13 +1,10 @@
 # -*- coding: utf-8 -*-
-from zope.component import getMultiAdapter
-from zope.component import getUtility
-from plone.registry.interfaces import IRegistry
-
 from Products.CMFCore.utils import getToolByName
 from Products.CMFPlone.interfaces import ISiteSchema
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_INTEGRATION_TESTING
-
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
+from plone.registry.interfaces import IRegistry
+from zope.component import getMultiAdapter
+from zope.component import getUtility
 import unittest2 as unittest
 
 
diff --git a/Products/CMFPlone/controlpanel/tests/test_controlpanel_types.py b/Products/CMFPlone/controlpanel/tests/test_controlpanel_types.py
index 3ec7c2e..fe95aef 100644
--- a/Products/CMFPlone/controlpanel/tests/test_controlpanel_types.py
+++ b/Products/CMFPlone/controlpanel/tests/test_controlpanel_types.py
@@ -1,15 +1,11 @@
 # -*- coding: utf-8 -*-
+from Products.CMFCore.utils import getToolByName
 from Products.CMFPlone.interfaces import ITypesSchema
-import unittest2 as unittest
-
+from Products.CMFPlone.testing import PRODUCTS_CMFPLONE_INTEGRATION_TESTING
+from plone.registry.interfaces import IRegistry
 from zope.component import getMultiAdapter
 from zope.component import getUtility
-from plone.registry.interfaces import IRegistry
-
-from Products.CMFCore.utils import getToolByName
-
-from Products.CMFPlone.testing import \
-    PRODUCTS_CMFPLONE_INTEGRATION_TESTING
+import unittest2 as unittest
 
 
 class TypesRegistryIntegrationTest(unittest.TestCase):
diff --git a/Products/CMFPlone/controlpanel/widgets.py b/Products/CMFPlone/controlpanel/widgets.py
index 081d471..4808edd 100644
--- a/Products/CMFPlone/controlpanel/widgets.py
+++ b/Products/CMFPlone/controlpanel/widgets.py
@@ -11,8 +11,8 @@ def isChecked(self, term):
 
     def extract(self, default=NO_VALUE):
         tokens = [t.token for t in self.terms]
-        if (self.name not in self.request and
-            self.name + '-empty-marker' in self.request):
+        if self.name not in self.request and\
+                self.name + '-empty-marker' in self.request:
             return tokens
         value = self.request.get(self.name, default)
         if value == default:
diff --git a/Products/CMFPlone/interfaces/__init__.py b/Products/CMFPlone/interfaces/__init__.py
index 499ab16..555d40e 100644
--- a/Products/CMFPlone/interfaces/__init__.py
+++ b/Products/CMFPlone/interfaces/__init__.py
@@ -1,8 +1,10 @@
-from properties import IPropertiesTool
-from properties import ISimpleItemWithProperties
+# flake8: noqa
 from basetool import IPloneBaseTool
-from basetool import IPloneTool
 from basetool import IPloneCatalogTool
+from basetool import IPloneTool
+from breadcrumbs import IHideFromBreadcrumbs
+from constrains import IConstrainTypes
+from constrains import ISelectableConstrainTypes
 from controlpanel import IControlPanel
 from controlpanel import IDateAndTimeSchema
 from controlpanel import IEditingSchema
@@ -10,28 +12,27 @@
 from controlpanel import INavigationSchema
 from controlpanel import ISearchSchema
 from controlpanel import ISiteSchema
-from controlpanel import ITinyMCEPatternSchema
-from controlpanel import ITinyMCESchema
 from controlpanel import ITinyMCELayoutSchema
-from controlpanel import ITinyMCEToolbarSchema
 from controlpanel import ITinyMCELibrariesSchema
+from controlpanel import ITinyMCEPatternSchema
 from controlpanel import ITinyMCEResourceTypesSchema
+from controlpanel import ITinyMCESchema
+from controlpanel import ITinyMCEToolbarSchema
 from controlpanel import ITypesSchema
 from events import IConfigurationChangedEvent
-from events import ISiteManagerCreatedEvent
 from events import IReorderedEvent
-from interface import IInterfaceTool
+from events import ISiteManagerCreatedEvent
 from installable import INonInstallable
+from interface import IInterfaceTool
 from migration import IMigrationTool
-from siteroot import IPloneSiteRoot
+from patterns import IPatternsSettings
+from properties import IPropertiesTool
+from properties import ISimpleItemWithProperties
+from resources import IBundleRegistry
+from resources import IResourceRegistry
 from siteroot import IMigratingPloneSiteRoot
+from siteroot import IPloneSiteRoot
 from siteroot import ITestCasePloneSiteRoot
-from constrains import IConstrainTypes
-from constrains import ISelectableConstrainTypes
 from structure import INonStructuralFolder
 from translationservice import ITranslationServiceTool
-from breadcrumbs import IHideFromBreadcrumbs
 from workflow import IWorkflowChain
-from resources import IResourceRegistry
-from resources import IBundleRegistry
-from patterns import IPatternsSettings
\ No newline at end of file