Commit c661a06d authored by Jérome Perrin's avatar Jérome Perrin

fixup! ERP5Type: more pylint / astroid fixes

parent 98a4b61e
Pipeline #33851 failed with stage
in 0 seconds
......@@ -467,10 +467,6 @@ _pylint_message_re = re.compile(
def checkPythonSourceCode(source_code_str, portal_type=None):
"""
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:
return []
......@@ -557,7 +553,13 @@ def checkPythonSourceCode(source_code_str, portal_type=None):
'--dummy-variables-rgx=_$|dummy|__traceback_info__|__traceback_supplement__',
]
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':
# __init__ method from base class %r is not called
args.append('--disable=W0231')
......
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