[Zope-CMF] DCWorkflow patch: A couple of docstrings ..

Jean Jordaan jean@upfrontsystems.co.za
Thu, 05 Dec 2002 11:10:10 +0200


This is a multi-part message in MIME format.
--------------000401040502050406060502
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi there

Here's a patch to add a couple of docstrings to States.py

-- 
Jean Jordaan
http://www.upfrontsystems.co.za

--------------000401040502050406060502
Content-Type: text/plain;
 name="docstring.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="docstring.patch"

--- DCWorkflow/States.py~	Tue Dec  3 09:38:36 2002
+++ DCWorkflow/States.py	Thu Dec  5 10:46:12 2002
@@ -132,12 +132,12 @@
             return vv.items()
     
     def getWorkflowVariables(self):
-        ''' get all variables that are available form
+        ''' get all variables that are available from
             workflow and not handled yet.
         '''
         wf_vars = self.getAvailableVarIds()
         if self.var_values is None:
-                return wf_vars
+            return wf_vars
         ret = []
         for vid in wf_vars:
             if not self.var_values.has_key(vid):
@@ -185,7 +185,7 @@
     _permissions_form = DTMLFile('state_permissions', _dtmldir)
 
     def manage_permissions(self, REQUEST, manage_tabs_message=None):
-        '''
+        ''' Present TTW UI for managing a State's permissions.
         '''
         
         return self._permissions_form(REQUEST,
@@ -194,8 +194,8 @@
                                      )
 
     def setPermissions(self, REQUEST):
-        ''' Form action of './dtml/state_permissions.dtml'. Sets
-            all managed permissions for all the roles.
+        ''' Form action of _permissions_form. Sets all managed
+            permissions for all the roles.
         '''
         pr = self.permission_roles
         if pr is None:
@@ -212,7 +213,8 @@
         return self.manage_permissions(REQUEST, 'Permissions changed.')
 
     def setPermission(self, permission, acquired, roles):
-        '''
+        ''' Used as DCWorkflow API. Sets one permission at a time for
+            specific roles.
         '''
         pr = self.permission_roles
         if pr is None:

--------------000401040502050406060502--