mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-12-04 22:42:21 +00:00
Upgrade code by using f-strings and yield from
This commit is contained in:
@@ -227,8 +227,7 @@ class ActionRow(Item[V]):
|
||||
An item in the action row.
|
||||
"""
|
||||
|
||||
for child in self.children:
|
||||
yield child
|
||||
yield from self.children
|
||||
|
||||
def content_length(self) -> int:
|
||||
""":class:`int`: Returns the total length of all text content in this action row."""
|
||||
|
||||
@@ -137,8 +137,7 @@ class Section(Item[V]):
|
||||
An item in this section.
|
||||
"""
|
||||
|
||||
for child in self.children:
|
||||
yield child
|
||||
yield from self.children
|
||||
yield self.accessory
|
||||
|
||||
def _update_view(self, view) -> None:
|
||||
|
||||
Reference in New Issue
Block a user