mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-12 21:21:43 +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,17 +1,14 @@
|
||||
import sys
|
||||
from _typeshed import AnyPath
|
||||
from typing import NamedTuple, Optional, Tuple, Union
|
||||
from typing import NamedTuple, Optional, Union
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
class SndHeaders(NamedTuple):
|
||||
filetype: str
|
||||
framerate: int
|
||||
nchannels: int
|
||||
nframes: int
|
||||
sampwidth: Union[int, str]
|
||||
_SndHeaders = SndHeaders
|
||||
else:
|
||||
_SndHeaders = Tuple[str, int, int, int, Union[int, str]]
|
||||
class SndHeaders(NamedTuple):
|
||||
filetype: str
|
||||
framerate: int
|
||||
nchannels: int
|
||||
nframes: int
|
||||
sampwidth: Union[int, str]
|
||||
|
||||
_SndHeaders = SndHeaders
|
||||
|
||||
def what(filename: AnyPath) -> Optional[_SndHeaders]: ...
|
||||
def whathdr(filename: AnyPath) -> Optional[_SndHeaders]: ...
|
||||
|
||||
Reference in New Issue
Block a user