Skip to content

Commit 301d15c

Browse files
committed
Lint repo with new ruff rules
1 parent 4b09c30 commit 301d15c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pydis_core/utils/interactions.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ def user_has_access(
2323
allowed_users: A sequence of user ids that are allowed access
2424
allowed_roles: A sequence of role ids that are allowed access
2525
"""
26-
if user.id in allowed_users or any(role.id in allowed_roles for role in getattr(user, "roles", [])):
27-
return True
28-
return False
26+
return bool(
27+
user.id in allowed_users or
28+
any(role.id in allowed_roles for role in getattr(user, "roles", []))
29+
)
2930

3031

3132
async def _handle_modify_message(message: Message, action: Literal["edit", "delete"]) -> None:

0 commit comments

Comments
 (0)