mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-07 17:39:03 +00:00
Upgrade code by using f-strings and yield from
This commit is contained in:
1 parent
3f47698791
commit
a7f349498a
3 files changed
+6
-8
No files matched your search
@@ -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