mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-17 13:59:45 +08:00
Use typing_extensions.Self instead of _typeshed.Self (#9702)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
from _typeshed import Incomplete, Self, SupportsRead, SupportsWrite
|
||||
from _typeshed import Incomplete, SupportsRead, SupportsWrite
|
||||
from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequence
|
||||
from enum import IntEnum
|
||||
from pathlib import Path
|
||||
from typing import Any, ClassVar, Protocol, SupportsBytes
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
from PIL.PyAccess import PyAccess
|
||||
|
||||
@@ -171,7 +171,7 @@ class Image:
|
||||
def height(self) -> int: ...
|
||||
@property
|
||||
def size(self) -> tuple[int, int]: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, NoReturn
|
||||
from typing_extensions import Self
|
||||
|
||||
from .Image import Image
|
||||
|
||||
@@ -40,7 +41,7 @@ class Parser:
|
||||
def reset(self) -> None: ...
|
||||
decode: Any
|
||||
def feed(self, data) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, *args: object) -> None: ...
|
||||
def close(self) -> Image: ...
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete, Self
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from typing import Any
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
from typing_extensions import Literal, Self, TypeAlias
|
||||
|
||||
from .Image import Image
|
||||
|
||||
@@ -122,14 +122,14 @@ class Color3DLUT(MultibandFilter):
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def generate(
|
||||
cls: type[Self],
|
||||
cls,
|
||||
size: int | tuple[int, int, int],
|
||||
callback: Callable[[float, float, float], Iterable[float]],
|
||||
channels: int = ...,
|
||||
target_mode: str | None = ...,
|
||||
) -> Self: ...
|
||||
def transform(
|
||||
self: Self,
|
||||
self,
|
||||
callback: Callable[..., Iterable[float]],
|
||||
with_normals: bool = ...,
|
||||
channels: Literal[3, 4] | None = ...,
|
||||
|
||||
Reference in New Issue
Block a user