[Erp5-report] r26906 - /erp5/trunk/products/ERP5Form/Form.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 11 09:11:44 CEST 2009


Author: yusei
Date: Mon May 11 09:11:44 2009
New Revision: 26906

URL: http://svn.erp5.org?rev=26906&view=rev
Log:
Fix indent.

Modified:
    erp5/trunk/products/ERP5Form/Form.py

Modified: erp5/trunk/products/ERP5Form/Form.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/Form.py?rev=26906&r1=26905&r2=26906&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/Form.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/Form.py [utf8] Mon May 11 09:11:44 2009
@@ -759,21 +759,22 @@
             if keyword_match_rate>0.5:
                 return keyword_match_rate
             else:
-              def split(string):
-                result = []
-                temporary = []
-                for char in string:
-                  if char.isupper():
-                    if temporary:
-                      result.append(''.join(temporary))
+                def split(string):
+                    result = []
                     temporary = []
-                  temporary.append(char)
-                result.append(''.join(temporary))
-                return result
-              if ''.join(field_id.split('_')[1:]).startswith(
-                split(field.meta_type)[0].lower()):
-                # At least it seems a generic template field of the meta_type.
-                return 0.1
+                    for char in string:
+                        if char.isupper():
+                            if temporary:
+                                result.append(''.join(temporary))
+                            temporary = []
+                        temporary.append(char)
+                    result.append(''.join(temporary))
+                    return result
+
+                if ''.join(field_id.split('_')[1:]).startswith(
+                    split(field.meta_type)[0].lower()):
+                    # At least it seems a generic template field of the meta_type.
+                    return 0.1
 
         def make_dict_list_append_function(dic, order_list):
             def append(key, item):




More information about the Erp5-report mailing list