3
0
Fork 0

fix: fix 'consider-using-set-comprehension' for pylint

This commit is contained in:
Lance Edgar 2025-09-01 10:22:29 -05:00
parent 564ac318bc
commit ec982fe168
3 changed files with 2 additions and 3 deletions

View file

@ -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,

View file

@ -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:

View file

@ -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)