diff --git a/discord/ui/container.py b/discord/ui/container.py index 4aad65ca4..a367c96e5 100644 --- a/discord/ui/container.py +++ b/discord/ui/container.py @@ -295,7 +295,7 @@ class Container(Item[V]): 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 and it's children, if applicable. diff --git a/discord/ui/view.py b/discord/ui/view.py index e7a17c2d7..2217474c5 100644 --- a/discord/ui/view.py +++ b/discord/ui/view.py @@ -30,6 +30,7 @@ from typing import ( ClassVar, Coroutine, Dict, + Generator, Iterator, List, Optional, @@ -585,7 +586,7 @@ class BaseView: """ 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 and it's children, if applicable.