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 authored and GitHub committed 2021-08-14 11:12:30 +02:00
1 parent 431c4f7fc1
commit ff63953188
235 files changed
+2473 -2768

No files matched your search

+3 -3
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: ...