asyncio.run: fix type of debug (#4567)

This commit is contained in:
Shantanu
2020-09-22 01:43:35 -07:00
committed by GitHub
parent 3d3dee91a3
commit b33896bcbc
2 changed files with 7 additions and 2 deletions

View File

@@ -1,7 +1,10 @@
import sys
if sys.version_info >= (3, 7):
from typing import Awaitable, TypeVar
from typing import Awaitable, Optional, TypeVar
_T = TypeVar("_T")
def run(main: Awaitable[_T], *, debug: bool = ...) -> _T: ...
if sys.version_info >= (3, 8):
def run(main: Awaitable[_T], *, debug: Optional[bool] = ...) -> _T: ...
else:
def run(main: Awaitable[_T], *, debug: bool = ...) -> _T: ...