Browse Source

fix: Add/Modify View/Container.walk_children return types

pull/10166/head
DA-344 4 weeks ago
parent
commit
b0b332a2e0
  1. 2
      discord/ui/container.py
  2. 3
      discord/ui/view.py

2
discord/ui/container.py

@ -295,7 +295,7 @@ class Container(Item[V]):
id=component.id, id=component.id,
) )
def walk_children(self) -> Generator[Item[V], Any, None]: def walk_children(self) -> Generator[Item[V], None, None]:
"""An iterator that recursively walks through all the children of this container """An iterator that recursively walks through all the children of this container
and it's children, if applicable. and it's children, if applicable.

3
discord/ui/view.py

@ -30,6 +30,7 @@ from typing import (
ClassVar, ClassVar,
Coroutine, Coroutine,
Dict, Dict,
Generator,
Iterator, Iterator,
List, List,
Optional, Optional,
@ -585,7 +586,7 @@ class BaseView:
""" """
return await self.__stopped return await self.__stopped
def walk_children(self): def walk_children(self) -> Generator[Item[Any], None, None]:
"""An iterator that recursively walks through all the children of this view """An iterator that recursively walks through all the children of this view
and it's children, if applicable. and it's children, if applicable.

Loading…
Cancel
Save