Commit c3c18992 authored by Jérome Perrin's avatar Jérome Perrin

patches/pylint: better stup for AccessControl.PermissionRole

parent 94b7c42c
...@@ -342,25 +342,25 @@ from astroid import register_module_extender ...@@ -342,25 +342,25 @@ from astroid import register_module_extender
def AccessControl_PermissionRole_transform(): def AccessControl_PermissionRole_transform():
return AstroidBuilder(MANAGER).string_build(''' return AstroidBuilder(MANAGER).string_build('''
def rolesForPermissionOn(perm, object, default=_default_roles, n=None): def rolesForPermissionOn(perm, object, default=_default_roles, n=None):
return None return tuple()
class PermissionRole(object): class PermissionRole(object):
def __init__(self, name, default=('Manager',)): def __init__(self, name, default=('Manager',)):
return None return None
def __of__(self, parent): def __of__(self, parent):
return None return imPermissionRole(self)
def rolesForPermissionOn(self, value): def rolesForPermissionOn(self, value):
return None return self.rolesForPermissionOn(None, self)
class imPermissionRole(object): class imPermissionRole(object):
def __of__(self, value): def __of__(self, value):
return None return self.rolesForPermissionOn(None, self)
def rolesForPermissionOn(self, value): def rolesForPermissionOn(self, value):
return None return rolesForPermissionOn(None, self)
def __getitem__(self, i): def __getitem__(self, i):
return None return None
def __len__(self): def __len__(self):
return None return 0
_what_not_even_god_should_do = [] _what_not_even_god_should_do = []
''') ''')
......
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