using set for rule and perm

This commit is contained in:
yanyongyu
2020-09-13 22:36:40 +08:00
parent b36acc94f1
commit 75df494de2
2 changed files with 15 additions and 5 deletions

View File

@ -30,7 +30,7 @@ class Permission:
if isinstance(other, Permission):
checkers |= other.checkers
elif asyncio.iscoroutinefunction(other):
checkers.add(other)
checkers.add(other) # type: ignore
else:
checkers.add(run_sync(other))
return Permission(*checkers)