Skip to content

Commit 13640e3

Browse files
authored
fix: Use Sequence instead of List in wait_for_component hints (#1764)
1 parent a4599dc commit 13640e3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

interactions/client/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,8 +1216,8 @@ async def wait_for_component(
12161216
messages: Optional[Union[Message, int, list]] = None,
12171217
components: Optional[
12181218
Union[
1219-
List[List[Union["BaseComponent", dict]]],
1220-
List[Union["BaseComponent", dict]],
1219+
Sequence[Sequence[Union["BaseComponent", dict]]],
1220+
Sequence[Union["BaseComponent", dict]],
12211221
"BaseComponent",
12221222
dict,
12231223
]

interactions/models/discord/components.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import contextlib
22
import uuid
33
from abc import abstractmethod
4-
from typing import Any, Dict, Iterator, List, Optional, Union, TYPE_CHECKING
4+
from typing import Any, Dict, Iterator, List, Optional, Sequence, Union, TYPE_CHECKING
55

66
import attrs
77
import discord_typings
@@ -1113,7 +1113,7 @@ def spread_to_rows(*components: Union[ActionRow, Button, StringSelectMenu], max_
11131113
return ActionRow.split_components(*components, count_per_row=max_in_row)
11141114

11151115

1116-
def get_components_ids(component: Union[str, dict, list, InteractiveComponent]) -> Iterator[str]:
1116+
def get_components_ids(component: Union[str, dict, list, InteractiveComponent, Sequence]) -> Iterator[str]:
11171117
"""
11181118
Creates a generator with the `custom_id` of a component or list of components.
11191119

0 commit comments

Comments
 (0)