Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-14 11:12:30 +02:00
committed by GitHub
parent 431c4f7fc1
commit ff63953188
235 changed files with 2473 additions and 2768 deletions

View File

@@ -1,5 +1,5 @@
import sys
from typing import Optional, Union, overload
from typing import overload
from typing_extensions import Literal
if sys.platform == "win32":
@@ -21,7 +21,7 @@ if sys.platform == "win32":
def Beep(frequency: int, duration: int) -> None: ...
# Can actually accept anything ORed with 4, and if not it's definitely str, but that's inexpressible
@overload
def PlaySound(sound: Optional[bytes], flags: Literal[4]) -> None: ...
def PlaySound(sound: bytes | None, flags: Literal[4]) -> None: ...
@overload
def PlaySound(sound: Optional[Union[str, bytes]], flags: int) -> None: ...
def PlaySound(sound: str | bytes | None, flags: int) -> None: ...
def MessageBeep(type: int = ...) -> None: ...