Skip to content

Commit 1ebea09

Browse files
revert str | type unions which cause errors on 3.14
1 parent 9d15fbd commit 1ebea09

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

disnake/components.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
ActionRowModalComponent: TypeAlias = "TextInput"
120120

121121
# any child component type of action rows
122-
ActionRowChildComponent: TypeAlias = ActionRowMessageComponent | ActionRowModalComponent
122+
ActionRowChildComponent: TypeAlias = Union[ActionRowMessageComponent, ActionRowModalComponent] # noqa: UP007
123123
ActionRowChildComponentT = TypeVar("ActionRowChildComponentT", bound=ActionRowChildComponent)
124124

125125
# valid `Section.accessory` types
@@ -154,7 +154,7 @@
154154
"Separator",
155155
"Container",
156156
]
157-
MessageTopLevelComponent: TypeAlias = MessageTopLevelComponentV1 | MessageTopLevelComponentV2
157+
MessageTopLevelComponent: TypeAlias = Union[MessageTopLevelComponentV1, MessageTopLevelComponentV2] # noqa: UP007
158158

159159

160160
_SELECT_COMPONENT_TYPES = frozenset(

disnake/ui/_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"Separator",
4949
"Container",
5050
]
51-
MessageTopLevelComponent: TypeAlias = MessageTopLevelComponentV1 | MessageTopLevelComponentV2
51+
MessageTopLevelComponent: TypeAlias = Union[MessageTopLevelComponentV1, MessageTopLevelComponentV2] # noqa: UP007
5252

5353
# valid modal component types (separate type with ActionRow until fully deprecated)
5454
ModalTopLevelComponent_: TypeAlias = Union[

0 commit comments

Comments
 (0)