clean python 3 specific stuff from stdlib/@python2 stubs (#5451)

This commit is contained in:
Akuli
2021-05-15 01:19:05 +03:00
committed by GitHub
parent f94d838814
commit 5ec4f06263
121 changed files with 1024 additions and 4801 deletions

View File

@@ -20,23 +20,10 @@ AUDIO_FILE_ENCODING_ADPCM_G723_5: int
AUDIO_FILE_ENCODING_ALAW_8: int
AUDIO_UNKNOWN_SIZE: int
if sys.version_info >= (3, 0):
class _sunau_params(NamedTuple):
nchannels: int
sampwidth: int
framerate: int
nframes: int
comptype: str
compname: str
else:
_sunau_params = Tuple[int, int, int, int, str, str]
_sunau_params = Tuple[int, int, int, int, str, str]
class Au_read:
def __init__(self, f: _File) -> None: ...
if sys.version_info >= (3, 3):
def __enter__(self) -> Au_read: ...
def __exit__(self, *args: Any) -> None: ...
def getfp(self) -> Optional[IO[bytes]]: ...
def rewind(self) -> None: ...
def close(self) -> None: ...
@@ -55,9 +42,6 @@ class Au_read:
class Au_write:
def __init__(self, f: _File) -> None: ...
if sys.version_info >= (3, 3):
def __enter__(self) -> Au_write: ...
def __exit__(self, *args: Any) -> None: ...
def setnchannels(self, nchannels: int) -> None: ...
def getnchannels(self) -> int: ...
def setsampwidth(self, sampwidth: int) -> None: ...
@@ -80,5 +64,4 @@ class Au_write:
# Returns a Au_read if mode is rb and Au_write if mode is wb
def open(f: _File, mode: Optional[str] = ...) -> Any: ...
if sys.version_info < (3, 9):
openfp = open
openfp = open