Commit 3b28c81e authored by Jérome Perrin's avatar Jérome Perrin

patches/pylint: adjust Module._getattr patch for py3

( I'm wondering if we need this patch at all on py3 )
parent 88bb5b0a
...@@ -248,7 +248,14 @@ def _getattr(self, name, *args, **kw): ...@@ -248,7 +248,14 @@ def _getattr(self, name, *args, **kw):
except NotFoundError as e: except NotFoundError as e:
if self.name.startswith('erp5.'): if self.name.startswith('erp5.'):
raise raise
if six.PY3 and self.name == 'numpy' or self.name.startswith('numpy.'): if six.PY3 and (
# astroid/pylint on py3 have built-in support for numpy
self.name == 'numpy'
or self.name.startswith('numpy.')
# SOAPPy.Types contains "from SOAPPy.Types import *" which confuses
# this patch
or self.name == 'SOAPpy.Types'
):
raise raise
real_module = __import__( real_module = __import__(
self.name, self.name,
......
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