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
139
Merge Requests
139
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
2efc2c9b
Commit
2efc2c9b
authored
Apr 04, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! ERP5Type: more pylint / astroid fixes
parent
cd7a306b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
product/ERP5Type/Utils.py
product/ERP5Type/Utils.py
+7
-5
No files found.
product/ERP5Type/Utils.py
View file @
2efc2c9b
...
@@ -467,10 +467,6 @@ _pylint_message_re = re.compile(
...
@@ -467,10 +467,6 @@ _pylint_message_re = re.compile(
def
checkPythonSourceCode
(
source_code_str
,
portal_type
=
None
):
def
checkPythonSourceCode
(
source_code_str
,
portal_type
=
None
):
"""
"""
Check source code with pylint or compile() builtin if not available.
Check source code with pylint or compile() builtin if not available.
TODO-arnau: Get rid of NamedTemporaryFile (require a patch on pylint to
allow passing a string) and this should probably return a proper
ERP5 object rather than a dict...
"""
"""
if
not
source_code_str
:
if
not
source_code_str
:
return
[]
return
[]
...
@@ -557,7 +553,13 @@ def checkPythonSourceCode(source_code_str, portal_type=None):
...
@@ -557,7 +553,13 @@ def checkPythonSourceCode(source_code_str, portal_type=None):
'--dummy-variables-rgx=_$|dummy|__traceback_info__|__traceback_supplement__'
,
'--dummy-variables-rgx=_$|dummy|__traceback_info__|__traceback_supplement__'
,
]
]
if
six
.
PY3
:
if
six
.
PY3
:
args
.
append
(
"--msg-template='{C}: {line},{column}: {msg} ({symbol})'"
)
args
.
extend
(
(
"--msg-template='{C}: {line},{column}: {msg} ({symbol})'"
,
# BBB until we drop compatibility with PY2
"--disable=redundant-u-string-prefix,raise-missing-from"
,
)
)
if
portal_type
==
'Interface Component'
:
if
portal_type
==
'Interface Component'
:
# __init__ method from base class %r is not called
# __init__ method from base class %r is not called
args
.
append
(
'--disable=W0231'
)
args
.
append
(
'--disable=W0231'
)
...
...
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