mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Akuli and srittau: Remove Python 2 branches from Python 3 stubs (#5461)
* run script and do some manual changes (Akuli) * do the whole thing manually (srittau) * merge changes (Akuli) Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
from typing import IO, Any, BinaryIO, NamedTuple, NoReturn, Optional, Text, Tuple, Union
|
||||
from typing import IO, Any, BinaryIO, NamedTuple, NoReturn, Optional, Text, Union
|
||||
|
||||
_File = Union[Text, IO[bytes]]
|
||||
|
||||
@@ -7,23 +7,18 @@ class Error(Exception): ...
|
||||
|
||||
WAVE_FORMAT_PCM: int
|
||||
|
||||
if sys.version_info >= (3, 0):
|
||||
class _wave_params(NamedTuple):
|
||||
nchannels: int
|
||||
sampwidth: int
|
||||
framerate: int
|
||||
nframes: int
|
||||
comptype: str
|
||||
compname: str
|
||||
|
||||
else:
|
||||
_wave_params = Tuple[int, int, int, int, str, str]
|
||||
class _wave_params(NamedTuple):
|
||||
nchannels: int
|
||||
sampwidth: int
|
||||
framerate: int
|
||||
nframes: int
|
||||
comptype: str
|
||||
compname: str
|
||||
|
||||
class Wave_read:
|
||||
def __init__(self, f: _File) -> None: ...
|
||||
if sys.version_info >= (3, 0):
|
||||
def __enter__(self) -> Wave_read: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
def __enter__(self) -> Wave_read: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
def getfp(self) -> Optional[BinaryIO]: ...
|
||||
def rewind(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
@@ -42,9 +37,8 @@ class Wave_read:
|
||||
|
||||
class Wave_write:
|
||||
def __init__(self, f: _File) -> None: ...
|
||||
if sys.version_info >= (3, 0):
|
||||
def __enter__(self) -> Wave_write: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
def __enter__(self) -> Wave_write: ...
|
||||
def __exit__(self, *args: Any) -> None: ...
|
||||
def setnchannels(self, nchannels: int) -> None: ...
|
||||
def getnchannels(self) -> int: ...
|
||||
def setsampwidth(self, sampwidth: int) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user