Commit 5d94956b authored by Jérome Perrin's avatar Jérome Perrin

administration: keep using pylint only for now

parent 4dd7260b
...@@ -5,7 +5,6 @@ from Products.ERP5Type.Utils import checkPythonSourceCode ...@@ -5,7 +5,6 @@ from Products.ERP5Type.Utils import checkPythonSourceCode
logger = logging.getLogger('extension.erp5.PythonCodeUtils') logger = logging.getLogger('extension.erp5.PythonCodeUtils')
def checkPythonSourceCodeAsJSON(self, data, REQUEST=None): def checkPythonSourceCodeAsJSON(self, data, REQUEST=None):
""" """
Check Python source suitable for Source Code Editor and return a JSON object Check Python source suitable for Source Code Editor and return a JSON object
...@@ -106,7 +105,7 @@ def checkPythonSourceCodeAsJSON(self, data, REQUEST=None): ...@@ -106,7 +105,7 @@ def checkPythonSourceCodeAsJSON(self, data, REQUEST=None):
# import pdb; pdb.set_trace() # import pdb; pdb.set_trace()
pylint_message_list = [] pylint_message_list = []
if 0: if 1:
start = time.time() start = time.time()
pylint_message_list = checkPythonSourceCode(code, data.get('portal_type')) pylint_message_list = checkPythonSourceCode(code, data.get('portal_type'))
logger.info( logger.info(
...@@ -114,6 +113,7 @@ def checkPythonSourceCodeAsJSON(self, data, REQUEST=None): ...@@ -114,6 +113,7 @@ def checkPythonSourceCodeAsJSON(self, data, REQUEST=None):
len(code.splitlines()), len(code.splitlines()),
time.time() - start time.time() - start
) )
message_list = pylint_message_list
for message_dict in message_list: for message_dict in message_list:
if is_script: if is_script:
...@@ -129,3 +129,4 @@ def checkPythonSourceCodeAsJSON(self, data, REQUEST=None): ...@@ -129,3 +129,4 @@ def checkPythonSourceCodeAsJSON(self, data, REQUEST=None):
if REQUEST is not None: if REQUEST is not None:
REQUEST.RESPONSE.setHeader('content-type', 'application/json') REQUEST.RESPONSE.setHeader('content-type', 'application/json')
return json.dumps(dict(annotations=message_list)) return json.dumps(dict(annotations=message_list))
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment