Commit e582ac6b 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 8e116c96
......@@ -238,7 +238,14 @@ def _getattr(self, name, *args, **kw):
except NotFoundError as e:
if self.name.startswith('erp5.'):
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
real_module = __import__(
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