Imports cleanup
authorThierry Florac <tflorac@ulthar.net>
Wed, 05 Dec 2018 16:54:30 +0100
changeset 1146 2477f95cf149
parent 1145 f62181d79748
child 1147 0723aa959926
Imports cleanup
src/pyams_content/shared/common/zmi/__init__.py
src/pyams_content/shared/common/zmi/properties.py
--- a/src/pyams_content/shared/common/zmi/__init__.py	Tue Dec 04 17:48:49 2018 +0100
+++ b/src/pyams_content/shared/common/zmi/__init__.py	Wed Dec 05 16:54:30 2018 +0100
@@ -12,27 +12,22 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
 from datetime import datetime
 from uuid import uuid4
 
 from pyramid.location import lineage
-from z3c.form import field, button
+from z3c.form import button, field
 from zope.copy import copy
 from zope.dublincore.interfaces import IZopeDublinCore
 from zope.interface import Interface
 from zope.lifecycleevent import ObjectCreatedEvent
 from zope.location import locate
 
-from pyams_content import _
 from pyams_content.features.review.interfaces import IReviewComments
-# import interfaces
-from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION, MANAGE_CONTENT_PERMISSION, \
-    CREATE_CONTENT_PERMISSION, PUBLISH_CONTENT_PERMISSION
-from pyams_content.shared.common.interfaces import IWfSharedContent, ISharedContent, IBaseSharedTool, \
-    IManagerRestrictions
-# import packages
+from pyams_content.interfaces import CREATE_CONTENT_PERMISSION, MANAGE_CONTENT_PERMISSION, MANAGE_SITE_ROOT_PERMISSION, \
+    PUBLISH_CONTENT_PERMISSION
+from pyams_content.shared.common.interfaces import IBaseSharedTool, IManagerRestrictions, ISharedContent, \
+    IWfSharedContent
 from pyams_form.form import AJAXAddForm, ajax_config
 from pyams_form.interfaces.form import IFormContextPermissionChecker, IWidgetsPrefixViewletsManager
 from pyams_form.schema import CloseButton
@@ -42,27 +37,29 @@
 from pyams_sequence.interfaces import ISequentialIdInfo
 from pyams_skin.interfaces import IContentTitle
 from pyams_skin.interfaces.container import ITable, ITableElementEditor
-from pyams_skin.interfaces.viewlet import IContextActions, IMenuHeader, IBreadcrumbItem
+from pyams_skin.interfaces.viewlet import IBreadcrumbItem, IContextActions, IMenuHeader
 from pyams_skin.layer import IPyAMSLayer
 from pyams_skin.page import DefaultPageHeaderAdapter
 from pyams_skin.table import DefaultElementEditorAdapter
 from pyams_skin.viewlet.breadcrumb import BreadcrumbAdminLayerItem
-from pyams_skin.viewlet.toolbar import ToolbarMenuItem, ToolbarMenuDivider
+from pyams_skin.viewlet.toolbar import ToolbarMenuDivider, ToolbarMenuItem
 from pyams_template.template import template_config
-from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter, ContextAdapter, ContextRequestAdapter
+from pyams_utils.adapter import ContextAdapter, ContextRequestAdapter, ContextRequestViewAdapter, adapter_config
 from pyams_utils.interfaces import FORBIDDEN_PERMISSION
 from pyams_utils.registry import get_utility
 from pyams_utils.request import check_request
 from pyams_utils.traversing import get_parent
 from pyams_utils.url import absolute_url, generate_url
-from pyams_viewlet.viewlet import viewlet_config, Viewlet
-from pyams_workflow.interfaces import IWorkflowVersions, IWorkflowInfo, IWorkflowState, IWorkflowCommentInfo, \
-    IWorkflow, IWorkflowPublicationInfo
+from pyams_viewlet.viewlet import Viewlet, viewlet_config
+from pyams_workflow.interfaces import IWorkflow, IWorkflowCommentInfo, IWorkflowInfo, IWorkflowPublicationInfo, \
+    IWorkflowState, IWorkflowVersions
 from pyams_workflow.versions import WorkflowHistoryItem
 from pyams_zmi.form import AdminDialogAddForm
 from pyams_zmi.interfaces.menu import ISiteManagementMenu
 from pyams_zmi.layer import IAdminLayer
 
+from pyams_content import _
+
 
 class SharedContentAddForm(AdminDialogAddForm):
     """Shared content add form"""
--- a/src/pyams_content/shared/common/zmi/properties.py	Tue Dec 04 17:48:49 2018 +0100
+++ b/src/pyams_content/shared/common/zmi/properties.py	Wed Dec 05 16:54:30 2018 +0100
@@ -12,19 +12,13 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
-
 from pyramid.events import subscriber
 from z3c.form import field
-from z3c.form.interfaces import IDataExtractedEvent, HIDDEN_MODE
+from z3c.form.interfaces import HIDDEN_MODE, IDataExtractedEvent
 from zope.interface import implementer
 
-from pyams_content import _
-# import interfaces
-from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION, IBaseContent
+from pyams_content.interfaces import IBaseContent, MANAGE_CONTENT_PERMISSION
 from pyams_content.shared.common.interfaces import IWfSharedContent
-# import packages
 from pyams_content.shared.common.zmi import WfSharedContentHeaderAdapter
 from pyams_form.form import ajax_config
 from pyams_form.interfaces.form import IWidgetForm
@@ -44,6 +38,8 @@
 from pyams_zmi.interfaces.menu import IContentManagementMenu, IPropertiesMenu
 from pyams_zmi.layer import IAdminLayer
 
+from pyams_content import _
+
 
 #
 # Content properties