mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 02:16:09 -05:00
[CI] Improve automated checks (#2702)
* same stuff, but with some more spurious error supression * fix issue in permissions found in this * fix a few more spurious errors * fix another issue * semi-spurious error fixes * . * formatting * move this to properly log * distutils import + virtualenv * more fixes
This commit is contained in:
@@ -69,7 +69,8 @@ def safe_delete(pth: Path):
|
||||
shutil.rmtree(str(pth), ignore_errors=True)
|
||||
|
||||
|
||||
class AsyncFilter(AsyncIterator[_T], Awaitable[List[_T]]):
|
||||
# https://github.com/PyCQA/pylint/issues/2717
|
||||
class AsyncFilter(AsyncIterator[_T], Awaitable[List[_T]]): # pylint: disable=duplicate-bases
|
||||
"""Class returned by `async_filter`. See that function for details.
|
||||
|
||||
We don't recommend instantiating this class directly.
|
||||
@@ -112,6 +113,9 @@ class AsyncFilter(AsyncIterator[_T], Awaitable[List[_T]]):
|
||||
async def __flatten(self) -> List[_T]:
|
||||
return [item async for item in self]
|
||||
|
||||
def __aiter__(self):
|
||||
return self
|
||||
|
||||
def __await__(self):
|
||||
# Simply return the generator filled into a list
|
||||
return self.__flatten().__await__()
|
||||
|
||||
Reference in New Issue
Block a user