From e9e5969a5c955501d702286d58024092b27ce46c Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Mon, 12 Jan 2009 19:08:53 +0530 Subject: [PATCH] quality module bzr revid: mra@tinyerp.com-20090112133853-ay2ipw8iy4y31btl --- .../base_module_quality/pylint_test/pylint_test.py | 2 ++ .../pylint_test/pylint_test_config.txt | 22 ++++++++++---------- .../base_module_quality/speed_test/speed_test.py | 6 ++++-- .../wizard/module_quality_check.py | 1 - 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/addons/base_module_quality/pylint_test/pylint_test.py b/addons/base_module_quality/pylint_test/pylint_test.py index 04eef3f..8f625da 100644 --- a/addons/base_module_quality/pylint_test/pylint_test.py +++ b/addons/base_module_quality/pylint_test/pylint_test.py @@ -67,6 +67,7 @@ class quality_test(base_module_quality.abstract_quality_check): break n += 1 leftchar = -1 +# print res while res[leftchar:leftchar+1] != ' ' and leftchar-1 <= 0: leftchar -= 1 rightchar = -10 @@ -80,6 +81,7 @@ class quality_test(base_module_quality.abstract_quality_check): score += 0 #self.result += file + ": "+_("Unable to parse the result. Check the details.")+"\n" dict[file] = [file, _("Unable to parse the result. Check the details.")] +# self.result_details += res.replace(''' instead of != -# +# [FORMAT] # Maximum number of characters on a single line. @@ -284,7 +284,7 @@ indent-string=' ' # checks for similarities and duplicated code. This computation may be # memory / CPU intensive, so you should disable it if you experiments some # problems. -# +# [SIMILARITIES] # Minimum lines number of a similarity. @@ -300,7 +300,7 @@ ignore-docstrings=yes # checks for: # * warning notes in the code like FIXME, XXX # * PEP 263: source code with non ascii character but no encoding declaration -# +# [MISCELLANEOUS] # List of note tags to take in consideration, separated by a comma. diff --git a/addons/base_module_quality/speed_test/speed_test.py b/addons/base_module_quality/speed_test/speed_test.py index 99523f2..eabccc0 100644 --- a/addons/base_module_quality/speed_test/speed_test.py +++ b/addons/base_module_quality/speed_test/speed_test.py @@ -110,9 +110,11 @@ This test checks the speed of the module. Note that at least 5 demo data is need return "" def get_result_details(self, dict): - header = ('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-10s \n! %-10s \n! %-10s \n! %-10s \n! %-20s', [_('Object Name'), _('N (Number of Records)'), _('1'), _('N/2'), _('N'), _('Reading Complexity')]) +# header = ('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-10s \n! %-10s \n! %-10s \n! %-10s \n! %-20s', [_('Object Name'), _('N (Number of Records)'), _('1'), _('N/2'), _('N'), _('Reading Complexity')]) + header = ('! %-40s \n! %-10s \n! %-10s \n! %-10s \n! %-10s \n! %-20s', [_('Object Name'), _('N (Number of Records)'), _('1'), _('N/2'), _('N'), _('Reading Complexity')]) + # todo ...ronvert result come from format table to html format will display in table format if not self.error: - return self.format_table(header, data_list=dict) + return '
' + self.format_table(header, data_list=dict) + '
' return "" # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_quality/wizard/module_quality_check.py b/addons/base_module_quality/wizard/module_quality_check.py index 002810b..f4d0ca78 100644 --- a/addons/base_module_quality/wizard/module_quality_check.py +++ b/addons/base_module_quality/wizard/module_quality_check.py @@ -60,7 +60,6 @@ class create_quality_check(wizard.interface): def _create_quality_check(self, cr, uid, data, context={}): pool = pooler.get_pool(cr.dbname) - print data, context objs = [] for id in data['ids']: module_data = pool.get('ir.module.module').browse(cr, uid, id) -- 1.7.10.4