1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-12-06 08:15:16 +00:00

[compat] Split into sub-modules (#2173)

Authored by: fstirlitz, pukkandan
This commit is contained in:
felix
2022-02-04 14:37:02 +01:00
committed by pukkandan
parent 19a0394044
commit 77f9033095
11 changed files with 274 additions and 318 deletions

View File

@@ -0,0 +1,16 @@
# flake8: noqa: F405
from asyncio import * # noqa: F403
from . import tasks # noqa: F401
try:
run # >= 3.7
except NameError:
def run(coro):
try:
loop = get_event_loop()
except RuntimeError:
loop = new_event_loop()
set_event_loop(loop)
loop.run_until_complete(coro)

View File

@@ -0,0 +1,8 @@
# flake8: noqa: F405
from asyncio.tasks import * # noqa: F403
try: # >= 3.7
all_tasks
except NameError:
all_tasks = Task.all_tasks