Better PEP 8 conformance
authorThierry Florac <tflorac@ulthar.net>
Wed, 19 Sep 2018 10:54:08 +0200
changeset 956 a8723fffbaf6
parent 955 3cee4d5a0c29
child 957 27c643fea2b4
Better PEP 8 conformance
src/pyams_content/component/association/zmi/__init__.py
src/pyams_content/component/keynumber/portlet/zmi/templates/keynumber-preview.pt
src/pyams_content/component/keynumber/zmi/paragraph.py
src/pyams_content/component/links/zmi/container.py
src/pyams_content/component/paragraph/interfaces/contact.py
src/pyams_content/component/paragraph/interfaces/map.py
src/pyams_content/component/paragraph/pictogram.py
src/pyams_content/component/paragraph/zmi/__init__.py
src/pyams_content/component/paragraph/zmi/container.py
src/pyams_content/component/paragraph/zmi/header.py
src/pyams_content/component/paragraph/zmi/keypoint.py
src/pyams_content/component/paragraph/zmi/map.py
src/pyams_content/component/video/zmi/paragraph.py
src/pyams_content/features/alert/interfaces.py
src/pyams_content/features/alert/zmi/container.py
src/pyams_content/features/checker/zmi/__init__.py
src/pyams_content/features/footer/__init__.py
src/pyams_content/features/header/__init__.py
src/pyams_content/features/header/interfaces/__init__.py
src/pyams_content/features/menu/portlet/navigation/zmi/double.py
src/pyams_content/features/redirect/container.py
src/pyams_content/features/redirect/interfaces/__init__.py
src/pyams_content/generations/__init__.py
src/pyams_content/reference/pictograms/zmi/manager.py
src/pyams_content/reference/pictograms/zmi/templates/pictogram-header.pt
src/pyams_content/root/zmi/__init__.py
src/pyams_content/root/zmi/search.py
src/pyams_content/root/zmi/sites.py
src/pyams_content/shared/blog/zmi/manager.py
src/pyams_content/shared/common/manager.py
src/pyams_content/shared/common/skin/opengraph.py
src/pyams_content/shared/common/zmi/__init__.py
src/pyams_content/shared/common/zmi/dashboard.py
src/pyams_content/shared/common/zmi/header.py
src/pyams_content/shared/common/zmi/search.py
src/pyams_content/shared/common/zmi/security.py
src/pyams_content/shared/common/zmi/summary.py
src/pyams_content/shared/common/zmi/types.py
src/pyams_content/shared/common/zmi/workflow.py
src/pyams_content/shared/form/manager.py
src/pyams_content/shared/logo/zmi/properties.py
src/pyams_content/shared/site/folder.py
src/pyams_content/shared/site/zmi/container.py
src/pyams_content/shared/site/zmi/folder.py
src/pyams_content/shared/view/interfaces/__init__.py
src/pyams_content/shared/view/reference.py
src/pyams_content/tests/test_utilsdocs.py
src/pyams_content/tests/test_utilsdocstrings.py
src/pyams_content/workflow/__init__.py
src/pyams_content/workflow/basic.py
src/pyams_content/workflow/task.py
--- a/src/pyams_content/component/association/zmi/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/association/zmi/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -181,8 +181,10 @@
     return switch_element_visibility(request, IAssociationContainer)
 
 
-@adapter_config(name='pictogram', context=(IAssociationContainerTarget, IPyAMSLayer, AssociationsTable), provides=IColumn)
-@adapter_config(name='pictogram', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), provides=IColumn)
+@adapter_config(name='pictogram', context=(IAssociationContainerTarget, IPyAMSLayer, AssociationsTable), 
+                provides=IColumn)
+@adapter_config(name='pictogram', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), 
+                provides=IColumn)
 class AssociationsTablePictogramColumn(ImageColumn):
     """Associations table pictogram column"""
 
@@ -197,8 +199,10 @@
         return self.request.localizer.translate(item.icon_hint)
 
 
-@adapter_config(name='name', context=(IAssociationContainerTarget, IPyAMSLayer, AssociationsTable), provides=IColumn)
-@adapter_config(name='name', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), provides=IColumn)
+@adapter_config(name='name', context=(IAssociationContainerTarget, IPyAMSLayer, AssociationsTable), 
+                provides=IColumn)
+@adapter_config(name='name', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), 
+                provides=IColumn)
 class AssociationsTablePublicNameColumn(NameColumn):
     """Associations table name column"""
 
@@ -215,8 +219,10 @@
         return title
 
 
-@adapter_config(name='inner_name', context=(IAssociationContainerTarget, IPyAMSLayer, AssociationsTable), provides=IColumn)
-@adapter_config(name='inner_name', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), provides=IColumn)
+@adapter_config(name='inner_name', context=(IAssociationContainerTarget, IPyAMSLayer, AssociationsTable), 
+                provides=IColumn)
+@adapter_config(name='inner_name', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), 
+                provides=IColumn)
 class AssociationsTableInnerNameColumn(I18nColumn, GetAttrColumn):
     """Associations table inner name column"""
 
@@ -231,8 +237,10 @@
             return '--'
 
 
-@adapter_config(name='size', context=(IAssociationContainerTarget, IPyAMSLayer, AssociationsTable), provides=IColumn)
-@adapter_config(name='size', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), provides=IColumn)
+@adapter_config(name='size', context=(IAssociationContainerTarget, IPyAMSLayer, AssociationsTable), 
+                provides=IColumn)
+@adapter_config(name='size', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), 
+                provides=IColumn)
 class AssociationsTableSizeColumn(I18nColumn, GetAttrColumn):
     """Associations table size column"""
 
@@ -247,8 +255,10 @@
             return '--'
 
 
-@adapter_config(name='trash', context=(IAssociationContainerTarget, IPyAMSLayer, AssociationsTable), provides=IColumn)
-@adapter_config(name='trash', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), provides=IColumn)
+@adapter_config(name='trash', context=(IAssociationContainerTarget, IPyAMSLayer, AssociationsTable), 
+                provides=IColumn)
+@adapter_config(name='trash', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), 
+                provides=IColumn)
 class AssociationsTableTrashColumn(ProtectedFormObjectMixin, TrashColumn):
     """Associations table trash column"""
 
--- a/src/pyams_content/component/keynumber/portlet/zmi/templates/keynumber-preview.pt	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/keynumber/portlet/zmi/templates/keynumber-preview.pt	Wed Sep 19 10:54:08 2018 +0200
@@ -23,7 +23,7 @@
 	</ul>
 	<div tal:define="visible_links list(settings.links.get_visible_items(request))"
 		 tal:condition="visible_links">
-		<u><i18n:var translate="" >Associated links</i18n:var> :</u>
+		<u><i18n:var translate>Associated links</i18n:var> :</u>
 		<ul>
 			<li tal:repeat="link visible_links">
 				<i class="fa fa-fw fa-eye-slash text-danger hint opaque align-base"
--- a/src/pyams_content/component/keynumber/zmi/paragraph.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/keynumber/zmi/paragraph.py	Wed Sep 19 10:54:08 2018 +0200
@@ -40,7 +40,7 @@
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
 from z3c.form import field, button
-from zope.interface import implementer, Interface
+from zope.interface import implementer
 
 from pyams_content import _
 
--- a/src/pyams_content/component/links/zmi/container.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/links/zmi/container.py	Wed Sep 19 10:54:08 2018 +0200
@@ -16,7 +16,8 @@
 # import standard library
 
 # import interfaces
-from pyams_content.component.association.interfaces import IAssociationContainer, IAssociationContainerTarget, IAssociationInfo
+from pyams_content.component.association.interfaces import IAssociationContainer, IAssociationContainerTarget, \
+    IAssociationInfo
 from pyams_content.component.extfile.interfaces import IBaseExtFile
 from pyams_content.component.links.interfaces import IBaseLink
 from pyams_i18n.interfaces import II18n
--- a/src/pyams_content/component/paragraph/interfaces/contact.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/paragraph/interfaces/contact.py	Wed Sep 19 10:54:08 2018 +0200
@@ -24,6 +24,7 @@
 try:
     from pyams_gis.schema import GeoPointField
 except ImportError:
+    GeoPointField = None
     have_gis = False
 else:
     have_gis = True
--- a/src/pyams_content/component/paragraph/interfaces/map.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/paragraph/interfaces/map.py	Wed Sep 19 10:54:08 2018 +0200
@@ -16,6 +16,7 @@
 try:
     from pyams_gis.schema import GeoPointField
 except ImportError:
+    GeoPointField = None
     have_gis = False
 else:
     have_gis = True
@@ -32,7 +33,6 @@
 
     from pyams_content import _
 
-
     #
     # Map paragraph
     #
--- a/src/pyams_content/component/paragraph/pictogram.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/paragraph/pictogram.py	Wed Sep 19 10:54:08 2018 +0200
@@ -26,7 +26,7 @@
 from pyams_content.reference.pictograms.interfaces import IPictogramTable
 from pyams_form.interfaces.form import IFormContextPermissionChecker
 from pyams_i18n.interfaces import II18n, II18nManager, INegotiator
-from zope.lifecycleevent import IObjectAddedEvent, ObjectModifiedEvent, ObjectCreatedEvent
+from zope.lifecycleevent import IObjectAddedEvent, ObjectModifiedEvent
 from zope.location.interfaces import ISublocations
 from zope.traversing.interfaces import ITraversable
 
--- a/src/pyams_content/component/paragraph/zmi/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -113,9 +113,11 @@
 def get_json_paragraph_toolbar_refresh_event(context, request, table_factory=None, viewlet_factory=None):
     """Get JSON response value for paragraph toolbar refresh event"""
     if table_factory is None:
-        from pyams_content.component.paragraph.zmi.container import ParagraphContainerTable as table_factory
+        from pyams_content.component.paragraph.zmi.container \
+            import ParagraphContainerTable as table_factory
     if viewlet_factory is None:
-        from pyams_content.component.paragraph.zmi.container import ParagraphTitleToolbarViewletManager as viewlet_factory
+        from pyams_content.component.paragraph.zmi.container \
+            import ParagraphTitleToolbarViewletManager as viewlet_factory
 
     parent = get_parent(context, IParagraphContainerTarget)
     if parent is not None:
--- a/src/pyams_content/component/paragraph/zmi/container.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/container.py	Wed Sep 19 10:54:08 2018 +0200
@@ -19,8 +19,8 @@
 # import interfaces
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
 from pyams_content.component.association.interfaces import IAssociationContainer
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, IBaseParagraph, \
-    IParagraphFactorySettings
+from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
+    IBaseParagraph, IParagraphFactorySettings
 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphTitleToolbar, \
     IParagraphContainerTable, IParagraphContainerView
 from pyams_form.interfaces.form import IFormSecurityContext, IInnerSubForm
@@ -433,7 +433,7 @@
                 view = AssociationsContainerView(paragraph, self.request)
                 view.widget_icon_class = 'fa fa-fw {0}'.format(paragraph.icon_class)
                 view.title = II18n(paragraph).query_attribute('title', request=self.request) or \
-                             BaseParagraph.empty_title
+                    BaseParagraph.empty_title
                 result.append(view)
         return result
 
--- a/src/pyams_content/component/paragraph/zmi/header.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/header.py	Wed Sep 19 10:54:08 2018 +0200
@@ -91,5 +91,6 @@
             output.setdefault('events', []).append(get_json_paragraph_refresh_event(self.context, self.request))
         if 'renderer' in updated:
             output.setdefault('events', []).append(get_json_widget_refresh_event(self.context, self.request,
-                                                                                 HeaderParagraphInnerEditForm, 'renderer'))
+                                                                                 HeaderParagraphInnerEditForm,
+                                                                                 'renderer'))
         return output
--- a/src/pyams_content/component/paragraph/zmi/keypoint.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/keypoint.py	Wed Sep 19 10:54:08 2018 +0200
@@ -37,7 +37,6 @@
 from pyams_utils.adapter import adapter_config
 from pyams_viewlet.viewlet import viewlet_config
 from pyams_zmi.form import AdminDialogAddForm
-from pyramid.view import view_config
 from z3c.form import field, button
 from zope.interface import implementer
 
--- a/src/pyams_content/component/paragraph/zmi/map.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/paragraph/zmi/map.py	Wed Sep 19 10:54:08 2018 +0200
@@ -32,8 +32,8 @@
     # import packages
     from pyams_content.component.paragraph.map import MapParagraph
     from pyams_content.component.paragraph.zmi import IParagraphContainerView, BaseParagraphAddMenu, \
-        BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, BaseParagraphPropertiesEditForm, IParagraphEditFormButtons, \
-        get_json_paragraph_refresh_event
+        BaseParagraphAJAXAddForm, BaseParagraphAJAXEditForm, BaseParagraphPropertiesEditForm, \
+        IParagraphEditFormButtons, get_json_paragraph_refresh_event
     from pyams_content.features.renderer.zmi.widget import RendererFieldWidget
     from pyams_form.form import ajax_config
     from pyams_pagelet.pagelet import pagelet_config
--- a/src/pyams_content/component/video/zmi/paragraph.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/component/video/zmi/paragraph.py	Wed Sep 19 10:54:08 2018 +0200
@@ -16,8 +16,7 @@
 # import standard library
 
 # import interfaces
-from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
-    IBaseParagraph
+from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer
 from pyams_content.component.paragraph.zmi.interfaces import IParagraphContainerView, IParagraphInnerEditor
 from pyams_content.component.video.interfaces import IExternalVideoProvider, IExternalVideoSettings, \
     IExternalVideoParagraph, EXTERNAL_VIDEO_PARAGRAPH_TYPE
--- a/src/pyams_content/features/alert/interfaces.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/features/alert/interfaces.py	Wed Sep 19 10:54:08 2018 +0200
@@ -25,7 +25,7 @@
 from pyams_i18n.schema import I18nTextLineField
 from pyams_sequence.schema import InternalReferenceField
 from zope.container.constraints import containers, contains
-from zope.interface import Interface, Attribute
+from zope.interface import Interface
 from zope.schema import Bool, Choice, Datetime, Int
 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
 
--- a/src/pyams_content/features/alert/zmi/container.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/features/alert/zmi/container.py	Wed Sep 19 10:54:08 2018 +0200
@@ -19,7 +19,6 @@
 # import interfaces
 from pyams_content.features.alert.interfaces import IAlertTarget, IAlertContainer
 from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION
-from pyams_i18n.interfaces import II18n
 from pyams_skin.interfaces import IPageHeader
 from pyams_skin.layer import IPyAMSLayer
 from pyams_zmi.interfaces.menu import ISiteManagementMenu
@@ -42,7 +41,6 @@
 from pyramid.decorator import reify
 from pyramid.exceptions import NotFound
 from pyramid.view import view_config
-from z3c.table.column import GetAttrColumn
 
 from pyams_content import _
 
--- a/src/pyams_content/features/checker/zmi/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/features/checker/zmi/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -20,13 +20,13 @@
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
 from pyams_form.interfaces.form import IWidgetsSuffixViewletsManager
 from pyams_skin.interfaces import IInnerPage
-from pyams_skin.interfaces.viewlet import IContextActions, IToolbarViewletManager
+from pyams_skin.interfaces.viewlet import IToolbarViewletManager
 from pyams_skin.layer import IPyAMSLayer
 from pyams_zmi.layer import IAdminLayer
 
 # import packages
 from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.viewlet.toolbar import ToolbarMenuItem, ToolbarAction
+from pyams_skin.viewlet.toolbar import ToolbarAction
 from pyams_viewlet.viewlet import viewlet_config, Viewlet
 from pyams_zmi.form import AdminDialogDisplayForm
 from z3c.form import field
--- a/src/pyams_content/features/footer/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/features/footer/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -16,8 +16,8 @@
 # import standard library
 
 # import interfaces
-from pyams_content.features.footer.interfaces import FOOTER_RENDERERS, IFooterRenderer, IFooterSettings, IFooterTarget, \
-    FOOTER_SETTINGS_KEY, IFooterRendererSettings, FOOTER_RENDERER_SETTINGS_KEY
+from pyams_content.features.footer.interfaces import FOOTER_RENDERERS, IFooterRenderer, IFooterSettings, \
+    IFooterTarget, FOOTER_SETTINGS_KEY, IFooterRendererSettings, FOOTER_RENDERER_SETTINGS_KEY
 from zope.lifecycleevent.interfaces import IObjectModifiedEvent
 from zope.traversing.interfaces import ITraversable
 
@@ -32,8 +32,8 @@
 from pyams_utils.traversing import get_parent
 from pyams_utils.vocabulary import vocabulary_config
 from pyramid.events import subscriber
-from zope.interface import implementer, noLongerProvides, alsoProvides
-from zope.location import Location, locate
+from zope.interface import implementer
+from zope.location import Location
 from zope.schema.fieldproperty import FieldProperty
 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
 
--- a/src/pyams_content/features/header/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/features/header/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -16,8 +16,8 @@
 # import standard library
 
 # import interfaces
-from pyams_content.features.header.interfaces import HEADER_RENDERERS, IHeaderRenderer, IHeaderSettings, IHeaderTarget, \
-    HEADER_SETTINGS_KEY, IHeaderRendererSettings, HEADER_RENDERER_SETTINGS_KEY
+from pyams_content.features.header.interfaces import HEADER_RENDERERS, IHeaderRenderer, IHeaderSettings, \
+    IHeaderTarget, HEADER_SETTINGS_KEY, IHeaderRendererSettings, HEADER_RENDERER_SETTINGS_KEY
 from zope.lifecycleevent.interfaces import IObjectModifiedEvent
 from zope.traversing.interfaces import ITraversable
 
@@ -32,8 +32,8 @@
 from pyams_utils.traversing import get_parent
 from pyams_utils.vocabulary import vocabulary_config
 from pyramid.events import subscriber
-from zope.interface import implementer, noLongerProvides, alsoProvides
-from zope.location import Location, locate
+from zope.interface import implementer
+from zope.location import Location
 from zope.schema.fieldproperty import FieldProperty
 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
 
--- a/src/pyams_content/features/header/interfaces/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/features/header/interfaces/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -57,6 +57,5 @@
     cache_key = Attribute("Renderer cache key")
 
 
-
 class IHeaderRendererSettings(IRendererSettings):
     """Header renderer settings interface"""
--- a/src/pyams_content/features/menu/portlet/navigation/zmi/double.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/features/menu/portlet/navigation/zmi/double.py	Wed Sep 19 10:54:08 2018 +0200
@@ -35,7 +35,7 @@
 from pyams_portal.zmi.portlet import PortletSettingsEditor, PortletSettingsPropertiesEditor
 from pyams_template.template import template_config
 from pyams_utils.adapter import adapter_config
-from zope.interface import alsoProvides, Interface
+from zope.interface import Interface
 
 from pyams_content import _
 
--- a/src/pyams_content/features/redirect/container.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/features/redirect/container.py	Wed Sep 19 10:54:08 2018 +0200
@@ -16,8 +16,8 @@
 # import standard library
 
 # import interfaces
-from pyams_content.features.redirect.interfaces import IRedirectionManager, IRedirectionRule, IRedirectionManagerTarget, \
-    REDIRECT_MANAGER_KEY
+from pyams_content.features.redirect.interfaces import IRedirectionManager, IRedirectionRule, \
+    IRedirectionManagerTarget, REDIRECT_MANAGER_KEY
 from zope.location.interfaces import ISublocations
 from zope.traversing.interfaces import ITraversable
 
--- a/src/pyams_content/features/redirect/interfaces/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/features/redirect/interfaces/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -23,7 +23,7 @@
 from pyams_sequence.schema import InternalReferenceField
 from zope.container.constraints import contains, containers
 from zope.interface import Interface, Attribute, invariant, Invalid
-from zope.schema import Bool, TextLine, Choice
+from zope.schema import Bool, TextLine
 
 from pyams_content import _
 
--- a/src/pyams_content/generations/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/generations/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -12,17 +12,26 @@
 
 __docformat__ = 'restructuredtext'
 
+import logging
 
-# import standard library
-import logging
 logger = logging.getLogger("PyAMS (content)")
 
-# import interfaces
+from hypatia.text.lexicon import Lexicon
+from pyramid.path import DottedNameResolver
+from zope.lifecycleevent import ObjectCreatedEvent
+from zope.dublincore.interfaces import IZopeDublinCore
+
+from pyams_catalog.index import FieldIndexWithInterface, KeywordIndexWithInterface, DatetimeIndexWithInterface
+from pyams_catalog.nltk import NltkFullTextProcessor
+from pyams_catalog.site import check_required_indexes
 from pyams_catalog.interfaces import MINUTE_RESOLUTION, DATE_RESOLUTION
 from pyams_content.component.theme import ITagsInfo, IThemesInfo, ICollectionsInfo
 from pyams_content.interfaces import IBaseContent, WEBMASTER_ROLE, OWNER_ROLE, PILOT_ROLE, MANAGER_ROLE, \
     CONTRIBUTOR_ROLE
+from pyams_content.reference import ReferencesManager
+from pyams_content.reference.pictograms import PictogramTable
 from pyams_content.root.interfaces import ISiteRootToolsConfiguration
+from pyams_content.shared.common.manager import SharedToolContainer
 from pyams_content.shared.common.interfaces import IWfSharedContent
 from pyams_content.shared.common.interfaces.types import IWfTypedSharedContent
 from pyams_content.shared.form.interfaces import IFormsManagerFactory
@@ -30,26 +39,14 @@
 from pyams_content.shared.logo.interfaces import ILogosManagerFactory
 from pyams_content.shared.news.interfaces import INewsManagerFactory
 from pyams_content.shared.view.interfaces import IViewsManagerFactory
-from pyams_utils.interfaces.site import ISiteGenerations
-from pyams_utils.interfaces.traversing import IPathElements
-from pyams_workflow.interfaces import IWorkflowState, IWorkflowPublicationInfo
-from zope.dublincore.interfaces import IZopeDublinCore
-
-# import packages
-from hypatia.text.lexicon import Lexicon
-from pyams_catalog.index import FieldIndexWithInterface, KeywordIndexWithInterface, DatetimeIndexWithInterface
-from pyams_catalog.nltk import NltkFullTextProcessor
-from pyams_catalog.site import check_required_indexes
-from pyams_content.reference import ReferencesManager
-from pyams_content.reference.pictograms import PictogramTable
-from pyams_content.shared.common.manager import SharedToolContainer
 from pyams_i18n.index import I18nTextIndexWithInterface
 from pyams_security.index import PrincipalsRoleIndex
 from pyams_thesaurus.index import ThesaurusTermsListFieldIndex
+from pyams_utils.interfaces.site import ISiteGenerations
+from pyams_utils.interfaces.traversing import IPathElements
 from pyams_utils.registry import utility_config, get_global_registry
 from pyams_utils.site import check_required_utilities
-from pyramid.path import DottedNameResolver
-from zope.lifecycleevent import ObjectCreatedEvent
+from pyams_workflow.interfaces import IWorkflowState, IWorkflowPublicationInfo
 
 
 def get_fulltext_lexicon(language):
@@ -83,7 +80,6 @@
         'pyams_content.features.menu.portlet.navigation.interfaces.simple ISimpleNavigationMenu'
 }
 
-
 REQUIRED_UTILITIES = ()
 
 REQUIRED_TABLES = (
@@ -247,8 +243,7 @@
         """Check for shared tools manager"""
         if registry is None:
             registry = get_global_registry()
-        name = config.tools_name or \
-               registry.settings.get('pyams_content.config.tools_name', 'tools')
+        name = config.tools_name or registry.settings.get('pyams_content.config.tools_name', 'tools')
         if name not in site:
             manager = SharedToolContainer()
             registry.notify(ObjectCreatedEvent(manager))
@@ -279,7 +274,7 @@
             if (factory is None) or (factory.upper() not in ('NONE', '--')):
                 attr_name = '{name}_tool_name'.format(name=name)
                 tool_name = getattr(config, attr_name, None) or \
-                            registry.settings.get('pyams_content.config.{name}'.format(name=attr_name), name)
+                    registry.settings.get('pyams_content.config.{name}'.format(name=attr_name), name)
                 if tool_name not in manager:
                     if factory is not None:
                         factory = DottedNameResolver().resolve(factory)
@@ -324,7 +319,8 @@
     order = 100
     generation = 1
 
-    def evolve(self, site, current=None):
+    @staticmethod
+    def evolve(site, current=None):
         """Check for required utilities, tables and tools"""
         check_required_utilities(site, REQUIRED_UTILITIES)
         check_required_indexes(site, get_required_indexes())
--- a/src/pyams_content/reference/pictograms/zmi/manager.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/reference/pictograms/zmi/manager.py	Wed Sep 19 10:54:08 2018 +0200
@@ -27,7 +27,7 @@
 from pyams_zmi.layer import IAdminLayer
 
 # import packages
-from pyams_form.form import AJAXEditForm, ajax_config
+from pyams_form.form import ajax_config
 from pyams_pagelet.pagelet import pagelet_config
 from pyams_skin.viewlet.menu import MenuItem
 from pyams_template.template import template_config
@@ -35,7 +35,6 @@
 from pyams_utils.traversing import get_parent
 from pyams_viewlet.viewlet import viewlet_config, Viewlet
 from pyams_zmi.form import AdminEditForm
-from pyramid.view import view_config
 from z3c.form import field, button
 from z3c.form.util import changedField
 from zope.interface import implementer, Interface
--- a/src/pyams_content/reference/pictograms/zmi/templates/pictogram-header.pt	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/reference/pictograms/zmi/templates/pictogram-header.pt	Wed Sep 19 10:54:08 2018 +0200
@@ -4,6 +4,6 @@
 			 content="structure tales:thumbnail(image, 32, 32)" />
 	<span class="padding-left-5" tal:define="header i18n:context.header"
 		  i18n:translate="">Default header:
-		<strong i18n:name="header" tal:content="header or '--'" />
+		<strong i18n:name="header">${header or '--'}</strong>
 	</span>
 </div>
--- a/src/pyams_content/root/zmi/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/root/zmi/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -172,8 +172,8 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = Eq(catalog['parents'], intids.register(tool)) & \
-                    Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
-                    Any(catalog['workflow_state'], workflow.waiting_states)
+                Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                Any(catalog['workflow_state'], workflow.waiting_states)
             params = params | query if params else query
         yield from filter(self.check_access,
                           unique_iter(map(lambda x: sorted(IWorkflowVersions(x).get_versions(IWorkflowState(x).state),
@@ -219,9 +219,9 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = Eq(catalog['parents'], intids.register(tool)) & \
-                    Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
-                    Any(catalog['workflow_state'], workflow.waiting_states) & \
-                    Eq(catalog['workflow_principal'], self.request.principal.id)
+                Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                Any(catalog['workflow_state'], workflow.waiting_states) & \
+                Eq(catalog['workflow_principal'], self.request.principal.id)
             params = params | query if params else query
         yield from unique_iter(map(lambda x: sorted(IWorkflowVersions(x).get_versions(IWorkflowState(x).state),
                                                     key=lambda y: IZopeDublinCore(y).modified, reverse=True)[0],
@@ -381,7 +381,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Or(Eq(catalog['role:owner'], self.request.principal.id),
                            Eq(catalog['role:contributor'], self.request.principal.id)),
                         Eq(catalog['workflow_state'], workflow.initial_state))
@@ -443,7 +443,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Or(Eq(catalog['role:owner'], self.request.principal.id),
                            Eq(catalog['role:contributor'], self.request.principal.id)),
                         Any(catalog['workflow_state'], workflow.waiting_states))
@@ -505,7 +505,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Or(Eq(catalog['role:owner'], self.request.principal.id),
                            Eq(catalog['role:contributor'], self.request.principal.id)),
                         Any(catalog['workflow_state'], workflow.published_states))
@@ -567,7 +567,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Or(Eq(catalog['role:owner'], self.request.principal.id),
                            Eq(catalog['role:contributor'], self.request.principal.id)),
                         Any(catalog['workflow_state'], workflow.retired_states))
@@ -631,7 +631,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Or(Eq(catalog['role:owner'], principal_id),
                            Eq(catalog['role:contributor'], principal_id)),
                         Any(catalog['workflow_state'], workflow.archived_states))
@@ -721,7 +721,7 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             query = And(Eq(catalog['parents'], intids.register(tool)),
-                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                        Any(catalog['content_type'], CONTENT_TYPES.keys()) & 
                         Any(catalog['workflow_state'], workflow.published_states))
             params = params | query if params else query
         yield from unique_iter(CatalogResultSet(CatalogQuery(catalog).query(params,
--- a/src/pyams_content/root/zmi/search.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/root/zmi/search.py	Wed Sep 19 10:54:08 2018 +0200
@@ -116,7 +116,7 @@
         intids = get_utility(IIntIds)
         catalog = get_utility(ICatalog)
         params = Eq(catalog['parents'], intids.register(self.context)) & \
-                 Any(catalog['content_type'], CONTENT_TYPES.keys())
+            Any(catalog['content_type'], CONTENT_TYPES.keys())
         query = self.request.params.get('query')
         if query:
             sequence = get_utility(ISequentialIntIds)
--- a/src/pyams_content/root/zmi/sites.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/root/zmi/sites.py	Wed Sep 19 10:54:08 2018 +0200
@@ -121,9 +121,10 @@
                 icon_class = 'fa-eye opacity-75'
             else:
                 icon_class = 'fa-eye-slash text-danger opaque'
-            return '<i class="fa fa-fw {icon_class} hint align-base" title="{title}" data-ams-hint-gravity="e"></i>'.format(
-                icon_class=icon_class,
-                title=self.request.localizer.translate(self.icon_hint))
+            return '<i class="fa fa-fw {icon_class} hint align-base" title="{title}" ' \
+                   'data-ams-hint-gravity="e"></i>'.format(
+                    icon_class=icon_class,
+                    title=self.request.localizer.translate(self.icon_hint))
 
 
 @adapter_config(name='oid', context=(ISiteRoot, IPyAMSLayer, SiteTreeTable), provides=IColumn)
--- a/src/pyams_content/shared/blog/zmi/manager.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/blog/zmi/manager.py	Wed Sep 19 10:54:08 2018 +0200
@@ -46,7 +46,6 @@
 from pyams_zmi.form import AdminDialogAddForm, AdminDialogEditForm
 from pyramid.events import subscriber
 from pyramid.path import DottedNameResolver
-from pyramid.view import view_config
 from z3c.form import field
 from zope.interface import Invalid
 
--- a/src/pyams_content/shared/common/manager.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/common/manager.py	Wed Sep 19 10:54:08 2018 +0200
@@ -17,8 +17,8 @@
 
 # import interfaces
 from pyams_content.interfaces import WEBMASTER_ROLE, PILOT_ROLE, MANAGER_ROLE, CONTRIBUTOR_ROLE
-from pyams_content.shared.common.interfaces import ISharedToolContainer, IBaseSharedTool, ISharedTool, ISharedToolRoles, \
-    ISharedContentFactory
+from pyams_content.shared.common.interfaces import ISharedToolContainer, IBaseSharedTool, ISharedTool, \
+    ISharedToolRoles, ISharedContentFactory
 from pyams_portal.interfaces import DESIGNER_ROLE
 from pyams_security.interfaces import IDefaultProtectionPolicy
 from pyams_workflow.interfaces import IWorkflow
--- a/src/pyams_content/shared/common/skin/opengraph.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/common/skin/opengraph.py	Wed Sep 19 10:54:08 2018 +0200
@@ -90,7 +90,8 @@
             image_size = thumbnail.image_size
             yield PropertyMeta('og:image:width', image_size[0])
             yield PropertyMeta('og:image:height', image_size[1])
-            yield PropertyMeta('og:image:alt', II18n(illustration).query_attribute('alt_title', lang=lang, request=request))
+            yield PropertyMeta('og:image:alt', II18n(illustration).query_attribute('alt_title', lang=lang,
+                                                                                   request=request))
         # locales properties
         yield PropertyMeta('of:locale', lang)
         for lang in II18nManager(context).languages or ():
--- a/src/pyams_content/shared/common/zmi/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -18,8 +18,8 @@
 from uuid import uuid4
 
 # import interfaces
-from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION, MANAGE_CONTENT_PERMISSION, CREATE_CONTENT_PERMISSION, \
-    PUBLISH_CONTENT_PERMISSION
+from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION, MANAGE_CONTENT_PERMISSION, \
+    CREATE_CONTENT_PERMISSION, PUBLISH_CONTENT_PERMISSION
 from pyams_content.features.review.interfaces import IReviewComments
 from pyams_content.shared.common.interfaces import IWfSharedContent, ISharedContent, IBaseSharedTool, \
     IManagerRestrictions
@@ -31,8 +31,8 @@
 from pyams_skin.interfaces.viewlet import IContextActions, IMenuHeader, IBreadcrumbItem
 from pyams_skin.layer import IPyAMSLayer
 from pyams_utils.interfaces import FORBIDDEN_PERMISSION
-from pyams_workflow.interfaces import IWorkflowVersions, IWorkflowInfo, IWorkflowState, IWorkflowCommentInfo, IWorkflow, \
-    IWorkflowPublicationInfo
+from pyams_workflow.interfaces import IWorkflowVersions, IWorkflowInfo, IWorkflowState, IWorkflowCommentInfo, \
+    IWorkflow, IWorkflowPublicationInfo
 from pyams_zmi.interfaces.menu import ISiteManagementMenu
 from pyams_zmi.layer import IAdminLayer
 from zope.dublincore.interfaces import IZopeDublinCore
--- a/src/pyams_content/shared/common/zmi/dashboard.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/dashboard.py	Wed Sep 19 10:54:08 2018 +0200
@@ -12,39 +12,32 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
+from hypatia.catalog import CatalogQuery
+from hypatia.interfaces import ICatalog
+from hypatia.query import And, Or, Eq, Any
+from z3c.table.column import GetAttrColumn
+from z3c.table.interfaces import IValues, IColumn
+from zope.dublincore.interfaces import IZopeDublinCore
+from zope.interface import implementer, Interface
+from zope.intid.interfaces import IIntIds
 
-# import interfaces
-from hypatia.interfaces import ICatalog
+from pyams_catalog.query import CatalogResultSet
 from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION, PUBLISH_CONTENT_PERMISSION
 from pyams_content.profile.interfaces import IAdminProfile
+from pyams_content.shared.common import CONTENT_TYPES
 from pyams_content.shared.common.interfaces import IBaseSharedTool, IWfSharedContent, IManagerRestrictions
 from pyams_content.shared.common.interfaces.zmi import IDashboardTable, ISharedToolDashboardTable, \
     IDashboardSearchHeader
+from pyams_content.skin import pyams_content
 from pyams_content.skin.zmi.interfaces import IDashboardMenu, IMyDashboardMenu, IAllContentsMenu
 from pyams_i18n.interfaces import II18n
+from pyams_pagelet.pagelet import pagelet_config
 from pyams_security.interfaces import ISecurityManager
 from pyams_sequence.interfaces import ISequentialIdInfo, ISequentialIdTarget, ISequentialIntIds
+from pyams_skin.container import ContainerView
 from pyams_skin.interfaces import IPageHeader
 from pyams_skin.interfaces.container import ITableElementName
 from pyams_skin.layer import IPyAMSLayer
-from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
-from pyams_workflow.interfaces import IWorkflowState, IWorkflow, IWorkflowVersions, IWorkflowPublicationInfo
-from pyams_zmi.interfaces.menu import IContentManagementMenu
-from pyams_zmi.layer import IAdminLayer
-from z3c.table.interfaces import IValues, IColumn
-from zope.dublincore.interfaces import IZopeDublinCore
-from zope.intid.interfaces import IIntIds
-
-# import packages
-from hypatia.catalog import CatalogQuery
-from hypatia.query import And, Or, Eq, Any
-from pyams_catalog.query import CatalogResultSet
-from pyams_content.shared.common import CONTENT_TYPES
-from pyams_content.skin import pyams_content
-from pyams_pagelet.pagelet import pagelet_config
-from pyams_skin.container import ContainerView
 from pyams_skin.page import DefaultPageHeaderAdapter
 from pyams_skin.table import BaseTable, I18nColumn, NameColumn, JsActionColumn
 from pyams_skin.viewlet.menu import MenuItem
@@ -52,6 +45,7 @@
 from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter
 from pyams_utils.date import format_datetime, SH_DATETIME_FORMAT
 from pyams_utils.fanstatic import get_resource_path
+from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION
 from pyams_utils.list import unique_iter
 from pyams_utils.property import cached_property
 from pyams_utils.registry import get_utility
@@ -59,9 +53,10 @@
 from pyams_utils.traversing import get_parent
 from pyams_viewlet.manager import viewletmanager_config
 from pyams_viewlet.viewlet import viewlet_config
+from pyams_workflow.interfaces import IWorkflowState, IWorkflow, IWorkflowVersions, IWorkflowPublicationInfo
+from pyams_zmi.interfaces.menu import IContentManagementMenu
+from pyams_zmi.layer import IAdminLayer
 from pyams_zmi.view import InnerAdminView
-from z3c.table.column import GetAttrColumn
-from zope.interface import implementer, Interface
 
 from pyams_content import _
 
@@ -340,8 +335,8 @@
         catalog = get_utility(ICatalog)
         workflow = get_utility(IWorkflow, name=self.context.shared_content_workflow)
         params = Eq(catalog['parents'], intids.register(self.context)) & \
-                 Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
-                 Any(catalog['workflow_state'], workflow.waiting_states)
+            Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+            Any(catalog['workflow_state'], workflow.waiting_states)
         yield from filter(self.check_access,
                           unique_iter(map(lambda x: sorted(IWorkflowVersions(x).get_versions(IWorkflowState(x).state),
                                                            key=lambda y: IZopeDublinCore(y).modified, reverse=True)[0],
@@ -384,9 +379,9 @@
         catalog = get_utility(ICatalog)
         workflow = get_utility(IWorkflow, name=self.context.shared_content_workflow)
         params = Eq(catalog['parents'], intids.register(self.context)) & \
-                 Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
-                 Any(catalog['workflow_state'], workflow.waiting_states) & \
-                 Eq(catalog['workflow_principal'], self.request.principal.id)
+            Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+            Any(catalog['workflow_state'], workflow.waiting_states) & \
+            Eq(catalog['workflow_principal'], self.request.principal.id)
         yield from unique_iter(map(lambda x: sorted(IWorkflowVersions(x).get_versions(IWorkflowState(x).state),
                                                     key=lambda y: IZopeDublinCore(y).modified, reverse=True)[0],
                                    CatalogResultSet(CatalogQuery(catalog).query(params,
@@ -445,8 +440,8 @@
     label = _("My contents")
     icon_class = 'fa-user'
     url = '#'
-    
-    
+
+
 #
 # My favorites
 # Dashboard of favorites contents
@@ -493,14 +488,14 @@
         oid = ISequentialIdInfo(item).hex_oid
         icon_class = 'fa fa-fw fa-star{0}'.format('' if oid in (self.profile.favorites or ()) else '-o')
         return '<i data-ams-plugins="pyams_content" ' \
-            'data-ams-plugin-pyams_content-src="{path}" ' \
-            'data-ams-click-handler="PyAMS_content.profile.switchFavorite" data-ams-stop-propagation="true" ' \
-            'data-sequence-oid="{oid}" ' \
-            'class="{icon_class}"></i>'.format(
-                path=get_resource_path(pyams_content),
-                oid=oid,
-                title=self.request.localizer.translate(self.icon_hint),
-                icon_class=icon_class)
+               'data-ams-plugin-pyams_content-src="{path}" ' \
+               'data-ams-click-handler="PyAMS_content.profile.switchFavorite" data-ams-stop-propagation="true" ' \
+               'data-sequence-oid="{oid}" ' \
+               'class="{icon_class}"></i>'.format(
+            path=get_resource_path(pyams_content),
+            oid=oid,
+            title=self.request.localizer.translate(self.icon_hint),
+            icon_class=icon_class)
 
     def get_url(self, item):
         return ''
@@ -578,7 +573,7 @@
         catalog = get_utility(ICatalog)
         workflow = get_utility(IWorkflow, name=self.context.shared_content_workflow)
         params = And(Eq(catalog['parents'], intids.register(self.context)),
-                     Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                     Any(catalog['content_type'], CONTENT_TYPES.keys()) &
                      Or(Eq(catalog['role:owner'], self.request.principal.id),
                         Eq(catalog['role:contributor'], self.request.principal.id)),
                      Eq(catalog['workflow_state'], workflow.initial_state))
@@ -587,7 +582,8 @@
                                                                             reverse=True)))
 
 
-@pagelet_config(name='my-preparations.html', context=IBaseSharedTool, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
+@pagelet_config(name='my-preparations.html', context=IBaseSharedTool, layer=IPyAMSLayer,
+                permission=VIEW_SYSTEM_PERMISSION)
 class SharedToolPreparationsView(InnerAdminView, ContainerView):
     """Shared tool preparations view"""
 
@@ -641,7 +637,7 @@
         catalog = get_utility(ICatalog)
         workflow = get_utility(IWorkflow, name=self.context.shared_content_workflow)
         params = And(Eq(catalog['parents'], intids.register(self.context)),
-                     Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                     Any(catalog['content_type'], CONTENT_TYPES.keys()) &
                      Or(Eq(catalog['role:owner'], self.request.principal.id),
                         Eq(catalog['role:contributor'], self.request.principal.id)),
                      Any(catalog['workflow_state'], workflow.waiting_states))
@@ -650,7 +646,8 @@
                                                                             reverse=True)))
 
 
-@pagelet_config(name='my-submissions.html', context=IBaseSharedTool, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
+@pagelet_config(name='my-submissions.html', context=IBaseSharedTool, layer=IPyAMSLayer,
+                permission=VIEW_SYSTEM_PERMISSION)
 class SharedToolSubmissionsView(InnerAdminView, ContainerView):
     """Shared tool submissions view"""
 
@@ -704,7 +701,7 @@
         catalog = get_utility(ICatalog)
         workflow = get_utility(IWorkflow, name=self.context.shared_content_workflow)
         params = And(Eq(catalog['parents'], intids.register(self.context)),
-                     Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                     Any(catalog['content_type'], CONTENT_TYPES.keys()) &
                      Or(Eq(catalog['role:owner'], self.request.principal.id),
                         Eq(catalog['role:contributor'], self.request.principal.id)),
                      Any(catalog['workflow_state'], workflow.published_states))
@@ -713,7 +710,8 @@
                                                                             reverse=True)))
 
 
-@pagelet_config(name='my-publications.html', context=IBaseSharedTool, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
+@pagelet_config(name='my-publications.html', context=IBaseSharedTool, layer=IPyAMSLayer,
+                permission=VIEW_SYSTEM_PERMISSION)
 class SharedToolPublicationsView(InnerAdminView, ContainerView):
     """Shared tool publications view"""
 
@@ -767,7 +765,7 @@
         catalog = get_utility(ICatalog)
         workflow = get_utility(IWorkflow, name=self.context.shared_content_workflow)
         params = And(Eq(catalog['parents'], intids.register(self.context)),
-                     Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                     Any(catalog['content_type'], CONTENT_TYPES.keys()) &
                      Or(Eq(catalog['role:owner'], self.request.principal.id),
                         Eq(catalog['role:contributor'], self.request.principal.id)),
                      Any(catalog['workflow_state'], workflow.retired_states))
@@ -832,7 +830,7 @@
         principal_id = self.request.principal.id
         workflow = get_utility(IWorkflow, name=self.context.shared_content_workflow)
         params = And(Eq(catalog['parents'], intids.register(self.context)),
-                     Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                     Any(catalog['content_type'], CONTENT_TYPES.keys()) &
                      Or(Eq(catalog['role:owner'], principal_id),
                         Eq(catalog['role:contributor'], principal_id)),
                      Any(catalog['workflow_state'], workflow.archived_states))
@@ -923,7 +921,7 @@
         catalog = get_utility(ICatalog)
         workflow = get_utility(IWorkflow, name=self.context.shared_content_workflow)
         params = And(Eq(catalog['parents'], intids.register(self.context)),
-                     Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
+                     Any(catalog['content_type'], CONTENT_TYPES.keys()) &
                      Any(catalog['workflow_state'], workflow.published_states))
         yield from unique_iter(CatalogResultSet(CatalogQuery(catalog).query(params,
                                                                             limit=50,
@@ -991,7 +989,7 @@
         intids = get_utility(IIntIds)
         catalog = get_utility(ICatalog)
         params = Eq(catalog['parents'], intids.register(self.context)) & \
-                 Any(catalog['content_type'], CONTENT_TYPES.keys())
+            Any(catalog['content_type'], CONTENT_TYPES.keys())
         yield from unique_iter(CatalogResultSet(CatalogQuery(catalog).query(params,
                                                                             limit=50,
                                                                             sort_index='modified_date',
--- a/src/pyams_content/shared/common/zmi/header.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/header.py	Wed Sep 19 10:54:08 2018 +0200
@@ -85,7 +85,8 @@
         state_format = translate(_("{state} by {principal}"))
         if state.state_urgency:
             state_format = state_format.replace('{state}',
-                                                '{state} <i class="fa fa-fw fa-exclamation-triangle txt-color-red"></i>');
+                                                '{state} '
+                                                '<i class="fa fa-fw fa-exclamation-triangle txt-color-red"></i>')
         elif state.state in workflow.published_states:
             pub_info = IWorkflowPublicationInfo(context, None)
             if (pub_info is not None) and not pub_info.is_published():
@@ -93,7 +94,8 @@
                                                     '{{state}} <i class="fa fa-fw fa-hourglass-half font-xs '
                                                     'text-danger opacity-75 hint align-base" '
                                                     'data-ams-hint-offset="5" title="{0}"></i>'.format(
-                                                        translate(_("Content publication start date is not passed yet"))))
+                                                        translate(_("Content publication start date is not passed "
+                                                                    "yet"))))
         state_class = 'text-danger'
         state_format = state_format.replace('{state}',
                                             '<span class="{0}">{{state}}</span>'.format(state_class))
--- a/src/pyams_content/shared/common/zmi/search.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/search.py	Wed Sep 19 10:54:08 2018 +0200
@@ -117,7 +117,7 @@
         intids = get_utility(IIntIds)
         catalog = get_utility(ICatalog)
         params = Eq(catalog['parents'], intids.register(self.context)) & \
-                 Any(catalog['content_type'], CONTENT_TYPES.keys())
+            Any(catalog['content_type'], CONTENT_TYPES.keys())
         query = self.request.params.get('query')
         if query:
             sequence = get_utility(ISequentialIntIds)
@@ -253,7 +253,7 @@
         intids = get_utility(IIntIds)
         catalog = get_utility(ICatalog)
         params = Eq(catalog['parents'], intids.register(self.context)) & \
-                 Any(catalog['content_type'], CONTENT_TYPES.keys())
+            Any(catalog['content_type'], CONTENT_TYPES.keys())
         query = data.get('query')
         if query:
             sequence = get_utility(ISequentialIntIds)
--- a/src/pyams_content/shared/common/zmi/security.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/security.py	Wed Sep 19 10:54:08 2018 +0200
@@ -164,7 +164,8 @@
 
     @property
     def legend(self):
-        return self.request.localizer.translate(_("Edit contributor restrictions for « {0} »")).format(self.principal.title)
+        return self.request.localizer.translate(_("Edit contributor restrictions for « {0} »")).format(
+            self.principal.title)
 
     @cached_property
     def interface(self):
@@ -252,7 +253,8 @@
     modal_target = True
 
 
-@adapter_config(name='name', context=(IBaseSharedTool, IAdminLayer, SharedToolManagersRestrictionsTable), provides=IColumn)
+@adapter_config(name='name', context=(IBaseSharedTool, IAdminLayer, SharedToolManagersRestrictionsTable),
+                provides=IColumn)
 class SharedToolManagerRestrictionsNameColumn(I18nColumn, GetAttrColumn):
     """Shared tool manager restrictions name column"""
 
--- a/src/pyams_content/shared/common/zmi/summary.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/summary.py	Wed Sep 19 10:54:08 2018 +0200
@@ -103,7 +103,7 @@
         return InnerAdminDisplayForm.__new__(cls)
 
     fields = field.Fields(IWorkflowState).select('state', 'state_urgency') + \
-             field.Fields(IWorkflowStateHistoryItem).select('comment')
+        field.Fields(IWorkflowStateHistoryItem).select('comment')
 
     def updateWidgets(self, prefix=None):
         super(SharedContentWorkflowWaitingState, self).updateWidgets(prefix)
@@ -154,10 +154,10 @@
     weight = 30
 
     fields = field.Fields(IWorkflowState).select('version_id', 'state') + \
-             field.Fields(IWfSharedContent).select('creation_label') + \
-             field.Fields(IWfSharedContentRoles).select('owner') + \
-             field.Fields(IWfSharedContent).select('last_update_label') + \
-             field.Fields(IWfSharedContent).select('modifiers')
+        field.Fields(IWfSharedContent).select('creation_label') + \
+        field.Fields(IWfSharedContentRoles).select('owner') + \
+        field.Fields(IWfSharedContent).select('last_update_label') + \
+        field.Fields(IWfSharedContent).select('modifiers')
 
     def updateWidgets(self, prefix=None):
         super(SharedContentWorkflowVersionSummary, self).updateWidgets(prefix)
@@ -183,7 +183,7 @@
     legend = _("Content history")
 
     fields = field.Fields(IWorkflowPublicationInfo).select('first_publication_date') + \
-             field.Fields(IWfSharedContent).select('first_owner')
+        field.Fields(IWfSharedContent).select('first_owner')
 
     weight = 40
 
--- a/src/pyams_content/shared/common/zmi/types.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/types.py	Wed Sep 19 10:54:08 2018 +0200
@@ -157,8 +157,8 @@
                '    </span>' \
                '</span>&nbsp;&nbsp;&nbsp;<span class="title">{title}</span>' \
                '<div class="inner-table-form subtypes margin-x-10 margin-bottom-0 padding-left-5"></div>'.format(
-            hint=self.request.localizer.translate(_("Click to see subtypes")),
-            title=super(TypedSharedToolTypesNameColumn, self).renderCell(item))
+                hint=self.request.localizer.translate(_("Click to see subtypes")),
+                title=super(TypedSharedToolTypesNameColumn, self).renderCell(item))
 
 
 @adapter_config(name='paragraphs', context=(ITypedSharedTool, IPyAMSLayer, TypedSharedToolTypesTable),
--- a/src/pyams_content/shared/common/zmi/workflow.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/workflow.py	Wed Sep 19 10:54:08 2018 +0200
@@ -141,9 +141,9 @@
         if state.version_id > 1:
             pub_fields += ('displayed_publication_date', )
         return field.Fields(IWorkflowTransitionInfo) + \
-               field.Fields(IWorkflowPublicationInfo).select(*pub_fields) + \
-               field.Fields(IWorkflowRequestUrgencyInfo) + \
-               field.Fields(IWorkflowCommentInfo)
+            field.Fields(IWorkflowPublicationInfo).select(*pub_fields) + \
+            field.Fields(IWorkflowRequestUrgencyInfo) + \
+            field.Fields(IWorkflowCommentInfo)
 
     buttons = button.Buttons(IPublicationRequestButtons)
 
@@ -322,8 +322,8 @@
         if state.version_id > 1:
             pub_fields += ('displayed_publication_date', )
         return field.Fields(IWorkflowTransitionInfo) + \
-               field.Fields(IWorkflowPublicationInfo).select(*pub_fields) + \
-               field.Fields(IWorkflowCommentInfo)
+            field.Fields(IWorkflowPublicationInfo).select(*pub_fields) + \
+            field.Fields(IWorkflowCommentInfo)
 
     buttons = button.Buttons(IPublicationButtons)
 
@@ -402,8 +402,8 @@
     """Shared content publication request refuse form"""
 
     fields = field.Fields(IWorkflowTransitionInfo) + \
-             field.Fields(IWorkflowRequestUrgencyInfo) + \
-             field.Fields(IWorkflowCommentInfo)
+        field.Fields(IWorkflowRequestUrgencyInfo) + \
+        field.Fields(IWorkflowCommentInfo)
     buttons = button.Buttons(IPublicationRetireRequestButtons)
 
     def updateWidgets(self, prefix=None):
@@ -539,8 +539,8 @@
     """Shared content publication request archive form"""
 
     fields = field.Fields(IWorkflowTransitionInfo) + \
-             field.Fields(IWorkflowRequestUrgencyInfo) + \
-             field.Fields(IWorkflowCommentInfo)
+        field.Fields(IWorkflowRequestUrgencyInfo) + \
+        field.Fields(IWorkflowCommentInfo)
     buttons = button.Buttons(IPublicationArchiveRequestButtons)
 
 
--- a/src/pyams_content/shared/form/manager.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/form/manager.py	Wed Sep 19 10:54:08 2018 +0200
@@ -18,7 +18,6 @@
 # import interfaces
 from pyams_content.shared.common.interfaces import ISharedContentFactory
 from pyams_content.shared.form.interfaces import IFormsManager, FORM_CONTENT_TYPE, IFormsManagerFactory
-from pyams_portal.interfaces import IPortalContext
 from zope.component.interfaces import ISite
 from zope.lifecycleevent.interfaces import IObjectAddedEvent
 
--- a/src/pyams_content/shared/logo/zmi/properties.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/logo/zmi/properties.py	Wed Sep 19 10:54:08 2018 +0200
@@ -41,7 +41,7 @@
     """Shared content DublinCore summary"""
 
     fields = field.Fields(IWfLogo).select('title', 'acronym') + \
-             field.Fields(ISequentialIdInfo).select('public_oid')
+        field.Fields(ISequentialIdInfo).select('public_oid')
 
 
 @pagelet_config(name='properties.html', context=IWfLogo, layer=IPyAMSLayer,
--- a/src/pyams_content/shared/site/folder.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/site/folder.py	Wed Sep 19 10:54:08 2018 +0200
@@ -42,8 +42,6 @@
 
 from pyams_content import _
 
-from pyams_content import _
-
 
 @implementer(IDefaultProtectionPolicy, ISiteFolder, ISiteFolderRoles,
              IIllustrationTarget, ILinkIllustrationTarget, IPortalContext, IPreviewTarget)
--- a/src/pyams_content/shared/site/zmi/container.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/site/zmi/container.py	Wed Sep 19 10:54:08 2018 +0200
@@ -332,9 +332,10 @@
                     icon_class = 'fa-eye opacity-75'
                 else:
                     icon_class = 'fa-eye-slash text-danger opaque'
-            return '<i class="fa fa-fw {icon_class} hint align-base" title="{title}" data-ams-hint-gravity="e"></i>'.format(
-                icon_class=icon_class,
-                title=self.request.localizer.translate(self.get_icon_hint(item)))
+            return '<i class="fa fa-fw {icon_class} hint align-base" title="{title}" ' \
+                   'data-ams-hint-gravity="e"></i>'.format(
+                    icon_class=icon_class,
+                    title=self.request.localizer.translate(self.get_icon_hint(item)))
 
     def get_icon_hint(self, item):
         translate = self.request.localizer.translate
@@ -393,12 +394,12 @@
                '        <i class="fa fa-fw {switch}"></i>' \
                '    </span>&nbsp;&nbsp;<span class="title">{title}</span>' \
                '</div>'.format(
-                   padding='<span class="tree-node-padding"></span>' * depth,
-                   hint=self.request.localizer.translate(_("Click to show/hide inner folders")),
-                   switch='fa-{state}-square-o switch'.format(
-                       state=self.table.rows_state or ('minus' if item in lineage(self.context) else 'plus'))
-                           if ISiteContainer.providedBy(item) else '',
-                   title=name or super(SiteContainerTreeNameColumn, self).renderCell(item))
+                padding='<span class="tree-node-padding"></span>' * depth,
+                hint=self.request.localizer.translate(_("Click to show/hide inner folders")),
+                switch='fa-{state}-square-o switch'.format(
+                    state=self.table.rows_state or ('minus' if item in lineage(self.context) else 'plus'))
+                if ISiteContainer.providedBy(item) else '',
+                title=name or super(SiteContainerTreeNameColumn, self).renderCell(item))
 
 
 @adapter_config(name='content-type', context=(ISiteContainer, IPyAMSLayer, ISiteTreeTable), provides=IColumn)
--- a/src/pyams_content/shared/site/zmi/folder.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/site/zmi/folder.py	Wed Sep 19 10:54:08 2018 +0200
@@ -190,7 +190,7 @@
     legend = _("Site folder properties")
 
     fields = field.Fields(ISiteFolder).select('title', 'short_name', 'heading', 'notepad') + \
-             field.Fields(IBaseSharedTool).select('shared_content_workflow')
+        field.Fields(IBaseSharedTool).select('shared_content_workflow')
 
 
 @adapter_config(name='navigation', context=(ISiteFolder, IPyAMSLayer, SiteFolderPropertiesEditForm),
--- a/src/pyams_content/shared/view/interfaces/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/view/interfaces/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -24,7 +24,7 @@
 # import packages
 from pyams_thesaurus.schema import ThesaurusTermsListField
 from zope.interface import Interface, Attribute
-from zope.schema import List, Set, Choice, Bool, Int
+from zope.schema import Set, Choice, Bool, Int
 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
 
 from pyams_content import _
@@ -41,7 +41,7 @@
 
 VIEW_ORDERS = (
     {'id': CREATION_DATE_ORDER, 'title': _("Creation date")},
-    {'id': UPDATE_DATE_ORDER,'title': _("Last update date")},
+    {'id': UPDATE_DATE_ORDER, 'title': _("Last update date")},
     {'id': PUBLICATION_DATE_ORDER, 'title': _("Current publication date")},
     {'id': FIRSTPUBLICATION_DATE_ORDER, 'title': _("First publication date")}
 )
--- a/src/pyams_content/shared/view/reference.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/shared/view/reference.py	Wed Sep 19 10:54:08 2018 +0200
@@ -24,7 +24,7 @@
 
 # import packages
 from hypatia.catalog import CatalogQuery
-from hypatia.query import Any, Not, NotEq
+from hypatia.query import Any, NotEq
 from pyams_catalog.query import CatalogResultSet, and_
 from pyams_content.workflow import VISIBLE_STATES
 from pyams_utils.adapter import adapter_config, ContextAdapter, get_annotation_adapter
@@ -87,6 +87,6 @@
         if (not items) or (settings.references_mode == ALWAYS_REFERENCE_MODE):
             catalog = get_utility(ICatalog)
             params = Any(catalog['oid'], settings.references) & \
-                     Any(catalog['workflow_state'], VISIBLE_STATES)
+                Any(catalog['workflow_state'], VISIBLE_STATES)
             items.prepend(CatalogResultSet(CatalogQuery(catalog).query(params)))
         return items
--- a/src/pyams_content/tests/test_utilsdocs.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/tests/test_utilsdocs.py	Wed Sep 19 10:54:08 2018 +0200
@@ -23,6 +23,7 @@
 
 current_dir = os.path.dirname(__file__)
 
+
 def doc_suite(test_dir, setUp=None, tearDown=None, globs=None):
     """Returns a test suite, based on doctests found in /doctest."""
     suite = []
@@ -50,10 +51,12 @@
 
     return unittest.TestSuite(suite)
 
+
 def test_suite():
     """returns the test suite"""
     return doc_suite(current_dir)
 
+
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')
 
--- a/src/pyams_content/tests/test_utilsdocstrings.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/tests/test_utilsdocstrings.py	Wed Sep 19 10:54:08 2018 +0200
@@ -23,6 +23,7 @@
 
 current_dir = os.path.abspath(os.path.dirname(__file__))
 
+
 def doc_suite(test_dir, globs=None):
     """Returns a test suite, based on doc tests strings found in /*.py"""
     suite = []
@@ -54,9 +55,11 @@
 
     return unittest.TestSuite(suite)
 
+
 def test_suite():
     """returns the test suite"""
     return doc_suite(current_dir)
 
+
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')
--- a/src/pyams_content/workflow/__init__.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/workflow/__init__.py	Wed Sep 19 10:54:08 2018 +0200
@@ -152,9 +152,9 @@
     # can't create new version when previous draft already exists
     versions = IWorkflowVersions(context)
     if (versions.has_version(DRAFT) or
-        versions.has_version(PROPOSED) or
-        versions.has_version(CANCELED) or
-        versions.has_version(REFUSED)):
+            versions.has_version(PROPOSED) or
+            versions.has_version(CANCELED) or
+            versions.has_version(REFUSED)):
         return False
     request = check_request()
     # grant access to webmaster
@@ -246,7 +246,8 @@
     for version in IWorkflowVersions(context).get_versions((PUBLISHED, RETIRING, RETIRED, ARCHIVING)):
         if version is not context:
             IWorkflowInfo(version).fire_transition_toward(ARCHIVED,
-                                                          comment=translate(_("Published version {0}")).format(version_id))
+                                                          comment=translate(_("Published version {0}")).format(
+                                                              version_id))
 
 
 def archive_action(wf, context):
--- a/src/pyams_content/workflow/basic.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/workflow/basic.py	Wed Sep 19 10:54:08 2018 +0200
@@ -157,7 +157,8 @@
     for version in IWorkflowVersions(context).get_versions((PUBLISHED, )):
         if version is not context:
             IWorkflowInfo(version).fire_transition_toward(ARCHIVED,
-                                                          comment=translate(_("Published version {0}")).format(version_id))
+                                                          comment=translate(_("Published version {0}")).format(
+                                                              version_id))
 
 
 def archive_action(wf, context):
--- a/src/pyams_content/workflow/task.py	Wed Sep 19 10:49:26 2018 +0200
+++ b/src/pyams_content/workflow/task.py	Wed Sep 19 10:54:08 2018 +0200
@@ -55,8 +55,8 @@
         for tool in get_all_utilities_registered_for(IBaseSharedTool):
             workflow = IWorkflow(tool)
             params = Eq(catalog['parents'], intids.register(tool)) & \
-                     Any(catalog['workflow_state'], workflow.published_states) & \
-                     Lt(catalog['expiration_date'], now)
+                Any(catalog['workflow_state'], workflow.published_states) & \
+                Lt(catalog['expiration_date'], now)
             for content in CatalogResultSet(CatalogQuery(catalog).query(params)):
                 if not has_retired:
                     report.write(translate(_("Automatic contents withdrawal:\n")))