mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Fix writeframes type in wave (#6997)
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from _typeshed import ReadableBuffer, Self
|
||||
from typing import IO, Any, BinaryIO, NamedTuple, NoReturn, Union
|
||||
from typing_extensions import Literal
|
||||
|
||||
_File = Union[str, IO[bytes]]
|
||||
|
||||
class Error(Exception): ...
|
||||
|
||||
WAVE_FORMAT_PCM: int
|
||||
WAVE_FORMAT_PCM: Literal[1]
|
||||
|
||||
class _wave_params(NamedTuple):
|
||||
nchannels: int
|
||||
@@ -57,9 +58,8 @@ class Wave_write:
|
||||
def getmark(self, id: Any) -> NoReturn: ...
|
||||
def getmarkers(self) -> None: ...
|
||||
def tell(self) -> int: ...
|
||||
# should be any bytes-like object after 3.4, but we don't have a type for that
|
||||
def writeframesraw(self, data: bytes) -> None: ...
|
||||
def writeframes(self, data: bytes) -> None: ...
|
||||
def writeframesraw(self, data: ReadableBuffer) -> None: ...
|
||||
def writeframes(self, data: ReadableBuffer) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
# Returns a Wave_read if mode is rb and Wave_write if mode is wb
|
||||
|
||||
Reference in New Issue
Block a user