mirror of
https://github.com/kakwa/ldapcherry
synced 2025-07-04 12:27:47 +02:00
many pep8 fixes thanks to pep8ify
This commit is contained in:
parent
2d12335030
commit
3712bb85cb
9 changed files with 178 additions and 152 deletions
|
@ -15,12 +15,14 @@ from ldapcherry.pyyamlwrapper import DumplicatedKey
|
|||
from ldapcherry.exceptions import DumplicateRoleKey, MissingKey, DumplicateRoleContent, MissingRolesFile, MissingRole
|
||||
import yaml
|
||||
|
||||
|
||||
class CustomDumper(yaml.SafeDumper):
|
||||
"A custom YAML dumper that never emits aliases"
|
||||
|
||||
def ignore_aliases(self, _data):
|
||||
return True
|
||||
|
||||
|
||||
class Roles:
|
||||
|
||||
def __init__(self, role_file):
|
||||
|
@ -141,7 +143,7 @@ class Roles:
|
|||
self.group2roles[b][g] = Set([])
|
||||
self.group2roles[b][g].add(roleid)
|
||||
|
||||
parent_roles[roleid]=[]
|
||||
parent_roles[roleid] = []
|
||||
for roleid2 in self.flatten:
|
||||
role2 = copy.deepcopy(self.flatten[roleid2])
|
||||
if self._is_parent(roleid, roleid2):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue