diff options
author | 2023-05-06 20:09:19 +0100 | |
---|---|---|
committer | 2023-05-31 13:03:54 +0100 | |
commit | ed602405df8e4ddf9e7993e42eea9a5e9afd4856 (patch) | |
tree | 3c2284b9d1ef15fa423875be832207b2a06ca291 /pydis_core/utils/interactions.py | |
parent | Bump action step versions in CI (diff) |
Apply fixes for ruff linting
Diffstat (limited to 'pydis_core/utils/interactions.py')
-rw-r--r-- | pydis_core/utils/interactions.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pydis_core/utils/interactions.py b/pydis_core/utils/interactions.py index a6746e1e..6e419342 100644 --- a/pydis_core/utils/interactions.py +++ b/pydis_core/utils/interactions.py @@ -1,4 +1,5 @@ -from typing import Literal, Optional, Sequence +from collections.abc import Sequence +from typing import Literal from discord import ButtonStyle, HTTPException, Interaction, Message, NotFound, ui @@ -43,8 +44,8 @@ class ViewWithUserAndRoleCheck(ui.View): *, allowed_users: Sequence[int], allowed_roles: Sequence[int], - timeout: Optional[float] = 180.0, - message: Optional[Message] = None + timeout: float | None = 180.0, + message: Message | None = None ) -> None: super().__init__(timeout=timeout) self.allowed_users = allowed_users @@ -97,7 +98,7 @@ class DeleteMessageButton(ui.Button): style (:literal-url:`ButtonStyle <https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.ButtonStyle>`): The style of the button, set to ``ButtonStyle.secondary`` if not specified. label: The label of the button, set to "Delete" if not specified. - """ # noqa: E501 + """ def __init__( self, |