Skip to content

Commit 0c7bdff

Browse files
third-party: make some protocol params pos-only (#11006)
1 parent 4deef75 commit 0c7bdff

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

stubs/Pillow/PIL/ImageFont.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Layout(IntEnum):
1212
MAX_STRING_LENGTH: Final[int] = 1_000_000
1313

1414
class _Font(Protocol):
15-
def getmask(self, text: str | bytes, mode: str = ..., direction=..., features=...): ...
15+
def getmask(self, __text: str | bytes, __mode: str = ..., direction=..., features=...): ...
1616

1717
class ImageFont:
1818
def getmask(self, text: str | bytes, mode: str = "", direction=..., features=...): ...

stubs/Pillow/PIL/ImageOps.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ from .ImageColor import _Ink
99
_Border: TypeAlias = int | tuple[int, int] | tuple[int, int, int, int]
1010

1111
class _Deformer(Protocol):
12-
def getmesh(self, image: Image): ...
12+
def getmesh(self, __image: Image): ...
1313

1414
def autocontrast(
1515
image: Image, cutoff: int = 0, ignore: int | None = None, mask: Image | None = None, preserve_tone: bool = False

stubs/Pillow/PIL/_imaging.pyi

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ class _PixelAccessor(Protocol): # noqa: Y046
1818
#
1919
# This protocol describes that interface.
2020
# TODO: should the color args and getter return types be _Color?
21-
def __setitem__(self, xy: tuple[int, int], color: Incomplete) -> None: ...
22-
def __getitem__(self, xy: tuple[int, int]) -> Incomplete: ...
23-
def putpixel(self, xy: tuple[int, int], color: Incomplete) -> None: ...
24-
def getpixel(self, xy: tuple[int, int]) -> Incomplete: ...
21+
def __setitem__(self, __xy: tuple[int, int], __color: Incomplete) -> None: ...
22+
def __getitem__(self, __xy: tuple[int, int]) -> Incomplete: ...
23+
def putpixel(self, __xy: tuple[int, int], __color: Incomplete) -> None: ...
24+
def getpixel(self, __xy: tuple[int, int]) -> Incomplete: ...
2525

2626
class _Path:
2727
def __getattr__(self, item: str) -> Incomplete: ...

stubs/WTForms/wtforms/form.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ _FormErrors: TypeAlias = dict[str | None, Sequence[str] | _FormErrors]
1313
# not instantianted after a new field had been added/removed
1414
class _UnboundFields(Protocol):
1515
@overload
16-
def __get__(self, obj: None, owner: type[object] | None = None) -> list[tuple[str, UnboundField[Any]]] | None: ...
16+
def __get__(self, __obj: None, __owner: type[object] | None = None) -> list[tuple[str, UnboundField[Any]]] | None: ...
1717
@overload
18-
def __get__(self, obj: object, owner: type[object] | None = None) -> list[tuple[str, UnboundField[Any]]]: ...
18+
def __get__(self, __obj: object, __owner: type[object] | None = None) -> list[tuple[str, UnboundField[Any]]]: ...
1919

2020
class BaseForm:
2121
meta: DefaultMeta

stubs/WebOb/webob/exc.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ from typing_extensions import Literal, Self
88
from webob.response import Response
99

1010
class _JSONFormatter(Protocol):
11-
def __call__(self, body: str, status: str, title: str, environ: WSGIEnvironment) -> str: ...
11+
def __call__(self, *, body: str, status: str, title: str, environ: WSGIEnvironment) -> str: ...
1212

1313
class HTTPException(Exception):
1414
wsgi_response: Response

stubs/bleach/bleach/callbacks.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ from bleach import _HTMLAttrKey
77
_HTMLAttrs: TypeAlias = MutableMapping[_HTMLAttrKey, str]
88

99
class _Callback(Protocol): # noqa: Y046
10-
def __call__(self, attrs: _HTMLAttrs, new: bool = ...) -> _HTMLAttrs: ...
10+
def __call__(self, __attrs: _HTMLAttrs, __new: bool = ...) -> _HTMLAttrs: ...
1111

1212
def nofollow(attrs: _HTMLAttrs, new: bool = False) -> _HTMLAttrs: ...
1313
def target_blank(attrs: _HTMLAttrs, new: bool = False) -> _HTMLAttrs: ...

stubs/click-spinner/click_spinner/__init__.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ __version__: str
99
class _Stream(Protocol):
1010
def isatty(self) -> bool: ...
1111
def flush(self) -> None: ...
12-
def write(self, s: str) -> int: ...
12+
def write(self, __s: str) -> int: ...
1313

1414
class Spinner:
1515
spinner_cycle: Iterator[str]

0 commit comments

Comments
 (0)