fix: fix 'consider-using-set-comprehension' for pylint
This commit is contained in:
parent
564ac318bc
commit
ec982fe168
3 changed files with 2 additions and 3 deletions
|
@ -6,7 +6,6 @@ disable=fixme,
|
|||
arguments-renamed,
|
||||
attribute-defined-outside-init,
|
||||
consider-using-generator,
|
||||
consider-using-set-comprehension,
|
||||
duplicate-code,
|
||||
isinstance-second-argument-not-valid-type,
|
||||
keyword-arg-before-vararg,
|
||||
|
|
|
@ -557,7 +557,7 @@ class RoleRefs(WuttaSet):
|
|||
auth.get_role_authenticated(session),
|
||||
auth.get_role_anonymous(session),
|
||||
}
|
||||
avoid = set([role.uuid for role in avoid])
|
||||
avoid = {role.uuid for role in avoid}
|
||||
|
||||
# also avoid admin unless current user is root
|
||||
if not self.request.is_root:
|
||||
|
|
|
@ -233,7 +233,7 @@ class UserView(MasterView): # pylint: disable=abstract-method
|
|||
session = self.Session()
|
||||
auth = self.app.get_auth_handler()
|
||||
|
||||
old_roles = set([role.uuid for role in user.roles])
|
||||
old_roles = {role.uuid for role in user.roles}
|
||||
new_roles = data["roles"]
|
||||
|
||||
admin = auth.get_role_administrator(session)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue