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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Papa Tamsir Kane
erp5
Commits
ae5ee205
Commit
ae5ee205
authored
Jul 03, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not fail completely if our pylint patch does not work with newer versions
parent
d3cdfa4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
product/ERP5Type/patches/pylint.py
product/ERP5Type/patches/pylint.py
+5
-4
No files found.
product/ERP5Type/patches/pylint.py
View file @
ae5ee205
...
...
@@ -22,9 +22,10 @@ from __future__ import absolute_import
from
inspect
import
getargspec
try
:
from
pylint.checkers
import
imports
from
pylint.checkers
.imports
import
ImportsChecker
import
astroid
except
ImportError
:
ImportsChecker
.
get_imported_module
except
(
AttributeError
,
ImportError
):
pass
else
:
def
_get_imported_module
(
self
,
importnode
,
modname
):
...
...
@@ -64,11 +65,11 @@ else:
args
=
repr
(
modname
)
self
.
add_message
(
"F0401"
,
args
=
args
,
node
=
importnode
)
if
'modnode'
in
getargspec
(
imports
.
ImportsChecker
.
get_imported_module
).
args
:
if
'modnode'
in
getargspec
(
ImportsChecker
.
get_imported_module
).
args
:
# BBB for pylint < 1.4.0
def
get_imported_module
(
self
,
modnode
,
importnode
,
modname
):
return
_get_imported_module
(
self
,
importnode
,
modname
)
else
:
get_imported_module
=
_get_imported_module
imports
.
ImportsChecker
.
get_imported_module
=
get_imported_module
ImportsChecker
.
get_imported_module
=
get_imported_module
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