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
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
1f68abb2
Commit
1f68abb2
authored
Jul 06, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pylint: make sure not to import isort when trying use an unsupported version
parent
03e60de1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
product/ERP5Type/patches/pylint.py
product/ERP5Type/patches/pylint.py
+11
-0
No files found.
product/ERP5Type/patches/pylint.py
View file @
1f68abb2
...
...
@@ -20,8 +20,16 @@
from
__future__
import
absolute_import
from
inspect
import
getargspec
import
sys
try
:
# TODO: Add support for newer versions pylint. Meanwhile, make sure that
# trying to use it does not import isort, because the latter hacks
# Python in order to execute:
# sys.setdefaultencoding('utf-8')
# This changes the behaviour of some ERP5 code.
sys
.
modules
.
setdefault
(
'isort'
,
None
)
from
pylint.checkers.imports
import
ImportsChecker
import
astroid
ImportsChecker
.
get_imported_module
...
...
@@ -73,3 +81,6 @@ else:
get_imported_module
=
_get_imported_module
ImportsChecker
.
get_imported_module
=
get_imported_module
finally
:
if
sys
.
modules
[
'isort'
]
is
None
:
del
sys
.
modules
[
'isort'
]
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