mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer, Self, Unused
|
||||
from _typeshed import ReadableBuffer, Unused
|
||||
from typing import IO, Any, BinaryIO, NamedTuple, NoReturn, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = ["open", "Error", "Wave_read", "Wave_write"]
|
||||
@@ -24,7 +24,7 @@ class _wave_params(NamedTuple):
|
||||
|
||||
class Wave_read:
|
||||
def __init__(self, f: _File) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
def getfp(self) -> BinaryIO | None: ...
|
||||
def rewind(self) -> None: ...
|
||||
@@ -44,7 +44,7 @@ class Wave_read:
|
||||
|
||||
class Wave_write:
|
||||
def __init__(self, f: _File) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: Unused) -> None: ...
|
||||
def setnchannels(self, nchannels: int) -> None: ...
|
||||
def getnchannels(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user