From 1a58a207f7249e077d12de6285c190021d790694 Mon Sep 17 00:00:00 2001
From: legac <renaud.legac@free.fr>
Date: Sat, 11 Apr 2015 13:40:43 +0200
Subject: [PATCH] Format note/raise/attention block.

---
 modules/plugin_dbui/converter.py        | 80 ++++++++++++++-----------
 modules/plugin_dbui/dbsvc.py            |  5 +-
 modules/plugin_dbui/directsvc.py        | 13 ++--
 modules/plugin_dbui/formmodifier.py     |  5 +-
 modules/plugin_dbui/gridmodifier.py     |  1 +
 modules/plugin_dbui/helper.py           | 15 +++--
 modules/plugin_dbui/storemodifier.py    |  6 +-
 modules/plugin_dbui/viewportmodifier.py | 10 ++--
 8 files changed, 76 insertions(+), 59 deletions(-)

diff --git a/modules/plugin_dbui/converter.py b/modules/plugin_dbui/converter.py
index b9b27195..11d8b888 100644
--- a/modules/plugin_dbui/converter.py
+++ b/modules/plugin_dbui/converter.py
@@ -67,13 +67,15 @@ def _to_field(field, linkedcombo=True, **kwargs):
     
     :returns: Field
     
-    :note: The return configurator is a L{Field}. However it can be a 
-    L{ComboBox}, a L{FieldDate}, a L{FieldTextArea}, ... 
-    depending on the ``type`` of the database field.
-    The association is defined in the dictionary L{FTYPE_TO_XTYPE}.
+    :note: 
+        The return configurator is a L{Field}. However it can be a 
+        L{ComboBox}, a L{FieldDate}, a L{FieldTextArea}, ... 
+        depending on the ``type`` of the database field.
+        The association is defined in the dictionary L{FTYPE_TO_XTYPE}.
      
-    :attention: It is recommended to used the more general method L{to_field}
-    which also understands ``FieldContainer``.
+    :attention: 
+        It is recommended to used the more general method L{to_field}
+        which also understands ``FieldContainer``.
     
     """
     T = current.T
@@ -174,13 +176,15 @@ def to_field(field, composite=True, linkedcombo=True, **kwargs):
     The conversion handles L{FieldContainer} and takes into account
     the ``FieldsModifier`` instructions.
 
-    :note: The return configurator is a L{Field}. However it can be a 
-    L{ComboBox}, a L{FieldDate}, a L{FieldTextArea}, ... 
-    depending on the ``type`` of the database field.
-    The association is defined in the dictionary L{FTYPE_TO_XTYPE}.
+    :note: 
+        The return configurator is a L{Field}. However it can be a 
+        L{ComboBox}, a L{FieldDate}, a L{FieldTextArea}, ... 
+        depending on the ``type`` of the database field.
+        The association is defined in the dictionary L{FTYPE_TO_XTYPE}.
     
-    :note: The database fields can be organized in L{FieldContainer}
-    in the application model using the modifiers L{FieldsModifier}.
+    :note: 
+        The database fields can be organized in L{FieldContainer}
+        in the application model using the modifiers L{FieldsModifier}.
 
     :type field: gluon.dal.Field
     :param field:
@@ -202,8 +206,9 @@ def to_field(field, composite=True, linkedcombo=True, **kwargs):
     
     :returns: Field or ``None``
     
-    :note: Return None when composite is ``True`` and when
-    the field is consumed by a ``FieldContainer``.
+    :note: 
+        Return None when composite is ``True`` and when
+        the field is consumed by a ``FieldContainer``.
     
     """
     table = field.table
@@ -247,16 +252,18 @@ def to_fields(table):
     """Build the list L{Field} configuration for each field 
     of the database ``table``. 
 
-    :note: The return configuration is a L{Field}. However it can be a 
-    L{ComboBox}, a L{FieldDate}, a L{FieldTextArea}, ... 
-    depending on the ``type`` of the database field.
-    The association is defined in the dictionary L{FTYPE_TO_XTYPE}.
+    :note: 
+        The return configuration is a L{Field}. However it can be a 
+        L{ComboBox}, a L{FieldDate}, a L{FieldTextArea}, ... 
+        depending on the ``type`` of the database field.
+        The association is defined in the dictionary L{FTYPE_TO_XTYPE}.
     
-    :note: The function handles L{FieldSet} and L{FieldContainer}
-    as well as the L{FieldsModifier} instructions.
-    The ``FieldSet`` and ``FieldContainer`` can be defined in the application
-    model using the modifier L{FormModifier} and the L{FieldsModifier} 
-    respectively.
+    :note: 
+        The function handles L{FieldSet} and L{FieldContainer}
+        as well as the L{FieldsModifier} instructions.
+        The ``FieldSet`` and ``FieldContainer`` can be defined in the application
+        model using the modifier L{FormModifier} and the L{FieldsModifier} 
+        respectively.
 
     :type table: gluon.dal.Table
     :returns: list
@@ -480,18 +487,21 @@ def to_gridFilter(table, **kwargs):
     
     :returns: GridFilter
 
-    :note: Return an empty dictionary if the GridFilter is
-    not defined in the application model.
-    
-    :note: A filter rule is defined in the model via the L{GridModifier}.
-    The rule is a ``tuple`` containing 3 strings 
-    ``("field1", "operator", "comment")``
-    where ``field1`` is the name of a field belonging to the ``table``.
-    A more elaborate filter rule allows to filter on any foreign field using
-    the syntax is ``("table2.field1", "operator", "comments")``.
-    Valid operators are defined in the method L{dbsvc.DbSvc._encode_query}.
-    
-    :note: Rules are store in the modifier section ``grid_filters``.
+    :note: 
+        Return an empty dictionary if the GridFilter is
+        not defined in the application model.
+    
+    :note: 
+        A filter rule is defined in the model via the L{GridModifier}.
+        The rule is a ``tuple`` containing 3 strings 
+        ``("field1", "operator", "comment")``
+        where ``field1`` is the name of a field belonging to the ``table``.
+        A more elaborate filter rule allows to filter on any foreign field using
+        the syntax is ``("table2.field1", "operator", "comments")``.
+        Valid operators are defined in the method L{dbsvc.DbSvc._encode_query}.
+    
+    :note: 
+        Rules are store in the modifier section ``grid_filters``.
         
     """    
     T = current.T
diff --git a/modules/plugin_dbui/dbsvc.py b/modules/plugin_dbui/dbsvc.py
index 155c84a7..2c5a1417 100644
--- a/modules/plugin_dbui/dbsvc.py
+++ b/modules/plugin_dbui/dbsvc.py
@@ -145,8 +145,9 @@ class DbSvc(BaseSvc):
         :type keywords: dict
         :param keywords: list of keys which have to be in ``arg``
         
-        :raise DbSvcException: when a keyword is missing or when the table
-        does not exist in the database.
+        :raise DbSvcException: 
+            when a keyword is missing or when the table
+            does not exist in the database.
         
         """            
         # check that the request is well formed
diff --git a/modules/plugin_dbui/directsvc.py b/modules/plugin_dbui/directsvc.py
index 1034673b..94e1a726 100644
--- a/modules/plugin_dbui/directsvc.py
+++ b/modules/plugin_dbui/directsvc.py
@@ -82,13 +82,14 @@ class DirectSvc(BaseSvc):
         
         :rtype: str
         :returns:
-            str --:
+            str
             
-                - the response of the function / method run
-                  on the server side
-                - the response is encoded as a JSON string.
+            - the response of the function / method run
+              on the server side
+            - the response is encoded as a JSON string.
             
-        :raise gluon.http.HTTP: when the request has no arguments
+        :raise gluon.http.HTTP: 
+            when the request has no arguments
             or when the function / method crashed.
         
         """
@@ -204,5 +205,3 @@ class DirectSvc(BaseSvc):
             
         self.dbg('End directSvc.call', li)
         return json.dumps(li, cls=MyJsonEncoder)
-        
-        
\ No newline at end of file
diff --git a/modules/plugin_dbui/formmodifier.py b/modules/plugin_dbui/formmodifier.py
index 95231411..708c4576 100644
--- a/modules/plugin_dbui/formmodifier.py
+++ b/modules/plugin_dbui/formmodifier.py
@@ -26,8 +26,9 @@ def configure_forms(db, **extjs):
         list of forms to be modified. They are identified by their
         associated table name.
     
-    :note: The keyword arguments define values for the Ext JS configuration 
-    options of he ``Ext.form.Panel`` class.
+    :note: 
+        The keyword arguments define values for the Ext JS configuration 
+        options of he ``Ext.form.Panel`` class.
     
     """
     if isinstance(db, DAL):
diff --git a/modules/plugin_dbui/gridmodifier.py b/modules/plugin_dbui/gridmodifier.py
index fb4ecdb8..428eb159 100644
--- a/modules/plugin_dbui/gridmodifier.py
+++ b/modules/plugin_dbui/gridmodifier.py
@@ -271,5 +271,6 @@ class GridModifier(Modifier):
         
         :type bool: boolean
         :param bool: activate the row numbering when ``True``.
+        
         """
         self.data.row_numbering = bool
diff --git a/modules/plugin_dbui/helper.py b/modules/plugin_dbui/helper.py
index 0ab8dbf4..b3f2fba9 100644
--- a/modules/plugin_dbui/helper.py
+++ b/modules/plugin_dbui/helper.py
@@ -122,12 +122,14 @@ def encode_field(*args):
 
     :returns: str
     
-    :note: useful to build database field name like ``TableField`` 
-    or ``TableFieldFunc``.
+    :note: 
+        useful to build database field name like ``TableField`` 
+        or ``TableFieldFunc``.
     
-    :note: The Ext JS ComboBox don't decode properly any separator between 
-    table and field like table+field. Therefore choice for the encoding
-    are very limited.
+    :note: 
+        The Ext JS ComboBox don't decode properly any separator between 
+        table and field like table+field. Therefore choice for the encoding
+        are very limited.
     
     """ 
     # NOTE: don't use the method title since foo_faa 
@@ -164,7 +166,8 @@ def get_all_tables(dal):
     
     :returns: list
     
-    :note: It is recommend to use standard iterator provided by 
+    :note: 
+        It is recommend to use standard iterator provided by 
         the gluon.dal.DAL class. However by construction, they ignore 
         alias table.
     
diff --git a/modules/plugin_dbui/storemodifier.py b/modules/plugin_dbui/storemodifier.py
index ce3cee50..8cb677a6 100644
--- a/modules/plugin_dbui/storemodifier.py
+++ b/modules/plugin_dbui/storemodifier.py
@@ -42,9 +42,9 @@ class AddStore(object):
         have to be defined. For more details see the ExtJS documentation.
         
         :note: 
-        The key associated to this store in the persistent dictionary
-        is the ``storeId``. Its value is derived from the store name, 
-        I{i.e} ``nameStore``.
+            The key associated to this store in the persistent dictionary
+            is the ``storeId``. Its value is derived from the store name, 
+            I{i.e} ``nameStore``.
         
         """
         static_stores = PluginManager('dbui').dbui.static_stores
diff --git a/modules/plugin_dbui/viewportmodifier.py b/modules/plugin_dbui/viewportmodifier.py
index acefb6e9..5cdcef05 100644
--- a/modules/plugin_dbui/viewportmodifier.py
+++ b/modules/plugin_dbui/viewportmodifier.py
@@ -54,11 +54,13 @@ class ViewportModifier(Modifier):
         :type args: list of L{Node}
         :param args:
         
-        :note: Elements of the list equal to ``None`` are ignored.
-        This feature is useful when the list of nodes depend on user role.
+        :note: 
+            Elements of the list equal to ``None`` are ignored.
+            This feature is useful when the list of nodes depend on user role.
         
-        :raise ViewportModifierException: at least one element of the list
-        is not a ``Node`` or ``None``.
+        :raise ViewportModifierException: 
+            at least one element of the list
+            is not a ``Node`` or ``None``.
          
         """
         li = []
-- 
GitLab