diff --git a/product/ERP5Type/patches/pylint.py b/product/ERP5Type/patches/pylint.py index e914445fd193b7414a76e6bdb386b9115717f369..fe1edead889b0878b3659bc948077c5d0ce0c804 100644 --- a/product/ERP5Type/patches/pylint.py +++ b/product/ERP5Type/patches/pylint.py @@ -179,6 +179,7 @@ def fail_hook_erp5_component(modname): else: module = _buildAstroidModuleFromComponentModuleName(modname) + module._absolute_import_activated = True return module MANAGER.register_failed_import_hook(fail_hook_erp5_component) @@ -223,10 +224,6 @@ def _getattr(self, name, *args, **kw): return [ast] Module.getattr = _getattr -# A temporary file is created to run pylint so this is not needed per se but -# it avoids useless checking for relative imports -Module.absolute_import_activated = lambda self: False - from astroid import register_module_extender def AccessControl_PermissionRole_transform(): return AstroidBuilder(MANAGER).string_build('''