Skip to content

Commit 1da73f6

Browse files
style(pre-commit): auto fixes from pre-commit.com hooks
1 parent 57282b8 commit 1da73f6

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

discord/ui/modal.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
from ..enums import ComponentType
1212
from ..utils import find
13+
from .core import ComponentUI
1314
from .input_text import InputText
1415
from .item import Item
1516
from .select import Select
1617
from .text_display import TextDisplay
17-
from .core import ComponentUI
1818

1919
__all__ = (
2020
"BaseModal",
@@ -34,6 +34,7 @@
3434

3535
ModalItem = Union[InputText, Item[M]]
3636

37+
3738
class BaseModal(ComponentUI):
3839
"""Represents a UI Modal dialog.
3940
@@ -331,6 +332,7 @@ async def on_timeout(self) -> None:
331332
A callback that is called when a modal's timeout elapses without being explicitly stopped.
332333
"""
333334

335+
334336
class Modal(Modal):
335337
"""Represents a UI Modal dialog.
336338

discord/ui/view.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import time
3232
from functools import partial
3333
from itertools import groupby
34-
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Iterator, Sequence, TypeVar
34+
from typing import TYPE_CHECKING, Any, ClassVar, Iterator, Sequence, TypeVar
3535

3636
from ..components import ActionRow as ActionRowComponent
3737
from ..components import Button as ButtonComponent
@@ -50,7 +50,13 @@
5050
from .core import ComponentUI
5151
from .item import Item, ItemCallbackType
5252

53-
__all__ = ("BaseView", "View", "DesignerView", "_component_to_item", "_walk_all_components")
53+
__all__ = (
54+
"BaseView",
55+
"View",
56+
"DesignerView",
57+
"_component_to_item",
58+
"_walk_all_components",
59+
)
5460

5561

5662
if TYPE_CHECKING:
@@ -191,6 +197,7 @@ def fits_legacy(self, item) -> bool:
191197
return item.row <= 4
192198
return self.weights[-1] + item.width <= 5
193199

200+
194201
class BaseView(ComponentUI):
195202
"""The base class for UI views used in messages."""
196203

@@ -501,6 +508,7 @@ def message(self):
501508
def message(self, value):
502509
self._message = value
503510

511+
504512
class View(BaseView):
505513
"""Represents a UI view for v1 components :class:`~discord.ui.Button` and :class:`~discord.ui.Select`.
506514
@@ -727,6 +735,7 @@ def refresh(self, components: list[Component]):
727735
def is_components_v2(self) -> bool:
728736
return False
729737

738+
730739
class DesignerView(BaseView):
731740
"""Represents a UI view compatible with v2 components.
732741

0 commit comments

Comments
 (0)