Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
6eff97a7
Commit
6eff97a7
authored
Nov 26, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
administration: keep using pylint only for now
parent
17c9307c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.PythonCodeUtils.py
...eItem/portal_components/extension.erp5.PythonCodeUtils.py
+3
-2
No files found.
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.PythonCodeUtils.py
View file @
6eff97a7
...
@@ -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
...
@@ -107,7 +106,7 @@ def checkPythonSourceCodeAsJSON(self, data, REQUEST=None):
...
@@ -107,7 +106,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
(
...
@@ -115,6 +114,7 @@ def checkPythonSourceCodeAsJSON(self, data, REQUEST=None):
...
@@ -115,6 +114,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
:
...
@@ -130,3 +130,4 @@ def checkPythonSourceCodeAsJSON(self, data, REQUEST=None):
...
@@ -130,3 +130,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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment