Skip to content

Commit a3d44b6

Browse files
style(pre-commit): auto fixes from pre-commit.com hooks
1 parent a9d095d commit a3d44b6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

discord/ui/view.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,9 +579,7 @@ def is_finished(self) -> bool:
579579
return self.__stopped.done()
580580

581581
def is_dispatchable(self) -> bool:
582-
return any(
583-
item.is_dispatchable() for item in self.children
584-
)
582+
return any(item.is_dispatchable() for item in self.children)
585583

586584
def is_dispatching(self) -> bool:
587585
"""Whether the view has been added for dispatching purposes."""

discord/webhook/async_.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,11 @@ async def send(
17911791
with_components = False
17921792

17931793
if view is not MISSING:
1794-
if isinstance(self._state, _WebhookState) and view and view.is_dispatchable():
1794+
if (
1795+
isinstance(self._state, _WebhookState)
1796+
and view
1797+
and view.is_dispatchable()
1798+
):
17951799
raise InvalidArgument(
17961800
"Dispatchable Webhook views require an associated state with the webhook"
17971801
)

0 commit comments

Comments
 (0)