mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-24 17:28:40 +08:00
third-party: make some protocol params pos-only (#11006)
This commit is contained in:
@@ -12,7 +12,7 @@ class Layout(IntEnum):
|
||||
MAX_STRING_LENGTH: Final[int] = 1_000_000
|
||||
|
||||
class _Font(Protocol):
|
||||
def getmask(self, text: str | bytes, mode: str = ..., direction=..., features=...): ...
|
||||
def getmask(self, __text: str | bytes, __mode: str = ..., direction=..., features=...): ...
|
||||
|
||||
class ImageFont:
|
||||
def getmask(self, text: str | bytes, mode: str = "", direction=..., features=...): ...
|
||||
|
||||
@@ -9,7 +9,7 @@ from .ImageColor import _Ink
|
||||
_Border: TypeAlias = int | tuple[int, int] | tuple[int, int, int, int]
|
||||
|
||||
class _Deformer(Protocol):
|
||||
def getmesh(self, image: Image): ...
|
||||
def getmesh(self, __image: Image): ...
|
||||
|
||||
def autocontrast(
|
||||
image: Image, cutoff: int = 0, ignore: int | None = None, mask: Image | None = None, preserve_tone: bool = False
|
||||
|
||||
@@ -18,10 +18,10 @@ class _PixelAccessor(Protocol): # noqa: Y046
|
||||
#
|
||||
# This protocol describes that interface.
|
||||
# TODO: should the color args and getter return types be _Color?
|
||||
def __setitem__(self, xy: tuple[int, int], color: Incomplete) -> None: ...
|
||||
def __getitem__(self, xy: tuple[int, int]) -> Incomplete: ...
|
||||
def putpixel(self, xy: tuple[int, int], color: Incomplete) -> None: ...
|
||||
def getpixel(self, xy: tuple[int, int]) -> Incomplete: ...
|
||||
def __setitem__(self, __xy: tuple[int, int], __color: Incomplete) -> None: ...
|
||||
def __getitem__(self, __xy: tuple[int, int]) -> Incomplete: ...
|
||||
def putpixel(self, __xy: tuple[int, int], __color: Incomplete) -> None: ...
|
||||
def getpixel(self, __xy: tuple[int, int]) -> Incomplete: ...
|
||||
|
||||
class _Path:
|
||||
def __getattr__(self, item: str) -> Incomplete: ...
|
||||
|
||||
Reference in New Issue
Block a user