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,12 +1,12 @@
from _typeshed import StrOrBytesPath
from typing import NamedTuple, Optional, Union
from typing import NamedTuple
class SndHeaders(NamedTuple):
filetype: str
framerate: int
nchannels: int
nframes: int
sampwidth: Union[int, str]
sampwidth: int | str
def what(filename: StrOrBytesPath) -> Optional[SndHeaders]: ...
def whathdr(filename: StrOrBytesPath) -> Optional[SndHeaders]: ...
def what(filename: StrOrBytesPath) -> SndHeaders | None: ...
def whathdr(filename: StrOrBytesPath) -> SndHeaders | None: ...