Commit 74f242a9 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Revert "pylint: Consider all imports as absolute."

This reverts commit 5b93b30f.
parent 5b93b30f
...@@ -179,6 +179,7 @@ def fail_hook_erp5_component(modname): ...@@ -179,6 +179,7 @@ def fail_hook_erp5_component(modname):
else: else:
module = _buildAstroidModuleFromComponentModuleName(modname) module = _buildAstroidModuleFromComponentModuleName(modname)
module._absolute_import_activated = True
return module return module
MANAGER.register_failed_import_hook(fail_hook_erp5_component) MANAGER.register_failed_import_hook(fail_hook_erp5_component)
...@@ -223,10 +224,6 @@ def _getattr(self, name, *args, **kw): ...@@ -223,10 +224,6 @@ def _getattr(self, name, *args, **kw):
return [ast] return [ast]
Module.getattr = _getattr 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 from astroid import register_module_extender
def AccessControl_PermissionRole_transform(): def AccessControl_PermissionRole_transform():
return AstroidBuilder(MANAGER).string_build(''' return AstroidBuilder(MANAGER).string_build('''
......
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