Skip to content

Commit 4fc3b83

Browse files
authored
fix: ActionRow.new() typehinting (#962)
1 parent 236d3b7 commit 4fc3b83

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

interactions/client/models/component.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import contextlib
2-
from typing import List, Optional
2+
from typing import List, Optional, Union
33

44
from ...api.error import LibraryException
55
from ...api.models.attrs_utils import MISSING, DictSerializerMixin, convert_list, define, field
@@ -297,12 +297,12 @@ def __attrs_post_init__(self) -> None:
297297
self._json["components"] = [component._json for component in self.components]
298298

299299
@classmethod
300-
def new(cls, *components: Component) -> "ActionRow":
300+
def new(cls, *components: Union[Button, SelectMenu, TextInput]) -> "ActionRow":
301301
r"""
302302
A class method for creating a new ``ActionRow``.
303303
304304
:param \*components: The components to add to the ``ActionRow``.
305-
:type \*components: Component
305+
:type \*components: Union[Button, SelectMenu, TextInput]
306306
:return: A new ``ActionRow``.
307307
:rtype: ActionRow
308308
"""

0 commit comments

Comments
 (0)