Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 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: ...