src/pyams_workflow/workflow.py
changeset 99 6136a9a4f380
parent 91 509f88791c41
--- a/src/pyams_workflow/workflow.py	Thu May 23 16:47:00 2019 +0200
+++ b/src/pyams_workflow/workflow.py	Fri May 24 08:45:15 2019 +0200
@@ -12,25 +12,21 @@
 
 __docformat__ = 'restructuredtext'
 
-
-# import standard library
-
-# import interfaces
-from pyams_workflow.interfaces import MANUAL, SYSTEM, AUTOMATIC, IWorkflow, InvalidTransitionError, IWorkflowState, \
-    IWorkflowVersions, IWorkflowVersion, IWorkflowInfo, IWorkflowManagedContent, WorkflowVersionTransitionEvent, \
-    WorkflowTransitionEvent, ConditionFailedError, NoTransitionAvailableError, AmbiguousTransitionError
-
-# import packages
-from pyams_utils.adapter import adapter_config
-from pyams_utils.registry import get_utility, get_global_registry
-from pyams_utils.request import check_request, query_request
-from pyams_utils.traversing import get_parent
-from pyams_utils.vocabulary import vocabulary_config
 from pyramid.httpexceptions import HTTPUnauthorized
 from zope.componentvocabulary.vocabulary import UtilityVocabulary
 from zope.interface import implementer
 from zope.lifecycleevent import ObjectModifiedEvent
 
+from pyams_utils.adapter import adapter_config
+from pyams_utils.registry import get_global_registry, get_utility
+from pyams_utils.request import check_request, query_request
+from pyams_utils.traversing import get_parent
+from pyams_utils.vocabulary import vocabulary_config
+from pyams_workflow.interfaces import AUTOMATIC, AmbiguousTransitionError, ConditionFailedError, IWorkflow, \
+    IWorkflowInfo, IWorkflowManagedContent, IWorkflowState, IWorkflowVersion, IWorkflowVersions, InvalidTransitionError, \
+    MANUAL, NoTransitionAvailableError, SYSTEM, WORKFLOWS_VOCABULARY, WorkflowTransitionEvent, \
+    WorkflowVersionTransitionEvent
+
 from pyams_workflow import _
 
 
@@ -282,7 +278,7 @@
         return [transition for transition in transitions if transition.trigger == trigger]
 
 
-@vocabulary_config(name='PyAMS workflows')
+@vocabulary_config(name=WORKFLOWS_VOCABULARY)
 class WorkflowsVocabulary(UtilityVocabulary):
     """Workflows vocabulary"""