Skip to content

Commit 88fa182

Browse files
authored
Use PEP 570 syntax in third party stubs (#11554)
1 parent f94bbfb commit 88fa182

File tree

97 files changed

+626
-633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+626
-633
lines changed

stubs/Deprecated/deprecated/classic.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ClassicAdapter:
1919
def __call__(self, wrapped: _F) -> Callable[[_F], _F]: ...
2020

2121
@overload
22-
def deprecated(__wrapped: _F) -> _F: ...
22+
def deprecated(wrapped: _F, /) -> _F: ...
2323
@overload
2424
def deprecated(
2525
reason: str = ..., *, version: str = ..., action: _Actions | None = ..., category: type[Warning] | None = ...

stubs/ExifRead/exifread/_types.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ TagDict: TypeAlias = dict[int, tuple[str] | tuple[str, Any]]
99

1010
class Reader(Protocol):
1111
def __iter__(self) -> bytes: ...
12-
def read(self, __size: int) -> bytes: ...
12+
def read(self, size: int, /) -> bytes: ...
1313
def tell(self) -> int: ...
14-
def seek(self, __offset: int, __whence: Literal[0, 1] = ...) -> object: ...
14+
def seek(self, offset: int, whence: Literal[0, 1] = ..., /) -> object: ...

stubs/Flask-SocketIO/flask_socketio/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class SocketIO:
5454
def on_error_default(self, exception_handler: _ExceptionHandler[_R_co]) -> _ExceptionHandler[_R_co]: ...
5555
def on_event(self, message: str, handler: _Handler[[Incomplete], object], namespace: str | None = None) -> None: ...
5656
@overload
57-
def event(self, __event_handler: _Handler[_P, _R_co]) -> _Handler[_P, _R_co]: ...
57+
def event(self, event_handler: _Handler[_P, _R_co], /) -> _Handler[_P, _R_co]: ...
5858
@overload
5959
def event(self, namespace: str | None = None, *args, **kwargs) -> _HandlerDecorator: ...
6060
def on_namespace(self, namespace_handler: Namespace) -> None: ...

stubs/Markdown/markdown/core.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ from .util import HtmlStash, Registry
1010
# TODO: The following protocols can be replaced by their counterparts from
1111
# codecs, once they have been propagated to all type checkers.
1212
class _WritableStream(Protocol):
13-
def write(self, __data: bytes) -> object: ...
14-
def seek(self, __offset: int, __whence: int) -> object: ...
13+
def write(self, data: bytes, /) -> object: ...
14+
def seek(self, offset: int, whence: int, /) -> object: ...
1515
def close(self) -> object: ...
1616

1717
class _ReadableStream(Protocol):
18-
def read(self, __size: int = ...) -> bytes: ...
19-
def seek(self, __offset: int, __whence: int) -> object: ...
18+
def read(self, size: int = ..., /) -> bytes: ...
19+
def seek(self, offset: int, whence: int, /) -> object: ...
2020
def close(self) -> object: ...
2121

2222
class Markdown:

stubs/Pillow/PIL/Image.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ _Color: TypeAlias = (
3434
)
3535

3636
class _Writeable(SupportsWrite[bytes], Protocol):
37-
def seek(self, __offset: int) -> Any: ...
37+
def seek(self, offset: int, /) -> Any: ...
3838

3939
# Ref: https://numpy.org/doc/stable/reference/arrays.interface.html#python-side
4040
class _SupportsArrayInterface(Protocol):

stubs/Pillow/PIL/ImageFont.pyi

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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,

stubs/Pillow/PIL/_imaging.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ class _PixelAccessor(Protocol): # noqa: Y046
1717
#
1818
# This protocol describes that interface.
1919
# TODO: should the color args and getter return types be _Color?
20-
def __setitem__(self, __xy: tuple[int, int], __color: Incomplete) -> None: ...
21-
def __getitem__(self, __xy: tuple[int, int]) -> Incomplete: ...
22-
def putpixel(self, __xy: tuple[int, int], __color: Incomplete) -> None: ...
23-
def getpixel(self, __xy: tuple[int, int]) -> Incomplete: ...
20+
def __setitem__(self, xy: tuple[int, int], color: Incomplete, /) -> None: ...
21+
def __getitem__(self, xy: tuple[int, int], /) -> Incomplete: ...
22+
def putpixel(self, xy: tuple[int, int], color: Incomplete, /) -> None: ...
23+
def getpixel(self, xy: tuple[int, int], /) -> Incomplete: ...
2424

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

28-
def path(__x: Sequence[tuple[float, float]] | Sequence[float]) -> _Path: ...
29-
def __getattr__(__name: str) -> Incomplete: ...
28+
def path(x: Sequence[tuple[float, float]] | Sequence[float], /) -> _Path: ...
29+
def __getattr__(name: str, /) -> Incomplete: ...

stubs/PyYAML/yaml/emitter.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ from .events import Event
88
_T_contra = TypeVar("_T_contra", str, bytes, contravariant=True)
99

1010
class _WriteStream(Protocol[_T_contra]):
11-
def write(self, __data: _T_contra) -> object: ...
11+
def write(self, data: _T_contra, /) -> object: ...
1212
# Optional fields:
1313
# encoding: str
1414
# def flush(self) -> object: ...

stubs/WTForms/wtforms/fields/core.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ _FieldT_contra = TypeVar("_FieldT_contra", bound=Field, contravariant=True)
1717
_Filter: TypeAlias = Callable[[Any], Any]
1818

1919
class _Validator(Protocol[_FormT_contra, _FieldT_contra]):
20-
def __call__(self, __form: _FormT_contra, __field: _FieldT_contra) -> object: ...
20+
def __call__(self, form: _FormT_contra, field: _FieldT_contra, /) -> object: ...
2121

2222
class _Widget(Protocol[_FieldT_contra]):
2323
def __call__(self, field: _FieldT_contra, **kwargs: Any) -> Markup: ...

stubs/WTForms/wtforms/form.pyi

Lines changed: 2 additions & 2 deletions
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/WTForms/wtforms/i18n.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ from typing import Protocol, TypeVar, overload
55
_T = TypeVar("_T")
66

77
class _SupportsUgettextAndUngettext(Protocol):
8-
def ugettext(self, __string: str) -> str: ...
9-
def ungettext(self, __singular: str, __plural: str, __n: int) -> str: ...
8+
def ugettext(self, string: str, /) -> str: ...
9+
def ungettext(self, singular: str, plural: str, n: int, /) -> str: ...
1010

1111
def messages_path() -> str: ...
1212
def get_builtin_gnu_translations(languages: Iterable[str] | None = None) -> GNUTranslations: ...

stubs/WTForms/wtforms/meta.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ from wtforms.form import BaseForm
1010
_FieldT = TypeVar("_FieldT", bound=Field)
1111

1212
class _SupportsGettextAndNgettext(Protocol):
13-
def gettext(self, __string: str) -> str: ...
14-
def ngettext(self, __singular: str, __plural: str, __n: int) -> str: ...
13+
def gettext(self, string: str, /) -> str: ...
14+
def ngettext(self, singular: str, plural: str, n: int, /) -> str: ...
1515

1616
# these are the methods WTForms depends on, the dict can either provide
1717
# a getlist or getall, if it only provides getall, it will wrapped, to
1818
# provide getlist instead
1919
class _MultiDictLikeBase(Protocol):
2020
def __iter__(self) -> Iterator[str]: ...
2121
def __len__(self) -> int: ...
22-
def __contains__(self, __key: Any) -> bool: ...
22+
def __contains__(self, key: Any, /) -> bool: ...
2323

2424
# since how file uploads are represented in formdata is implementation-specific
2525
# we have to be generous in what we accept in the return of getlist/getall
2626
# we can make this generic if we ever want to be more specific
2727
class _MultiDictLikeWithGetlist(_MultiDictLikeBase, Protocol):
28-
def getlist(self, __key: str) -> list[Any]: ...
28+
def getlist(self, key: str, /) -> list[Any]: ...
2929

3030
class _MultiDictLikeWithGetall(_MultiDictLikeBase, Protocol):
31-
def getall(self, __key: str) -> list[Any]: ...
31+
def getall(self, key: str, /) -> list[Any]: ...
3232

3333
_MultiDictLike: TypeAlias = _MultiDictLikeWithGetall | _MultiDictLikeWithGetlist
3434

stubs/WebOb/webob/acceptparse.pyi

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,18 @@ def create_accept_header(header_value: str) -> AcceptValidHeader | AcceptInvalid
110110

111111
class _AcceptProperty:
112112
@overload
113-
def __get__(self, __obj: None, __type: type | None = ...) -> property: ...
113+
def __get__(self, obj: None, type: type | None = ..., /) -> property: ...
114114
@overload
115-
def __get__(self, __obj: Any, __type: type | None = ...) -> AcceptNoHeader | AcceptValidHeader | AcceptInvalidHeader: ...
115+
def __get__(self, obj: Any, type: type | None = ..., /) -> AcceptNoHeader | AcceptValidHeader | AcceptInvalidHeader: ...
116116
@overload
117-
def __set__(self, __obj: Any, __value: str | None) -> None: ...
117+
def __set__(self, obj: Any, value: str | None, /) -> None: ...
118118
@overload
119-
def __set__(self, __obj: Any, __value: AcceptNoHeader | AcceptValidHeader | AcceptInvalidHeader) -> None: ...
119+
def __set__(self, obj: Any, value: AcceptNoHeader | AcceptValidHeader | AcceptInvalidHeader, /) -> None: ...
120120
@overload
121-
def __set__(self, __obj: Any, __value: SupportsItems[str, float | tuple[float, str]]) -> None: ...
121+
def __set__(self, obj: Any, value: SupportsItems[str, float | tuple[float, str]], /) -> None: ...
122122
@overload
123-
def __set__(self, __obj: Any, __value: _ListOrTuple[str | tuple[str, float, str] | list[Any]]) -> None: ...
124-
def __delete__(self, __obj: Any) -> None: ...
123+
def __set__(self, obj: Any, value: _ListOrTuple[str | tuple[str, float, str] | list[Any]], /) -> None: ...
124+
def __delete__(self, obj: Any, /) -> None: ...
125125

126126
def accept_property() -> _AcceptProperty: ...
127127

@@ -221,22 +221,22 @@ def create_accept_charset_header(header_value: str) -> AcceptCharsetValidHeader
221221

222222
class _AcceptCharsetProperty:
223223
@overload
224-
def __get__(self, __obj: None, __type: type | None = ...) -> property: ...
224+
def __get__(self, obj: None, type: type | None = ..., /) -> property: ...
225225
@overload
226226
def __get__(
227-
self, __obj: Any, __type: type | None = ...
227+
self, obj: Any, type: type | None = ..., /
228228
) -> AcceptCharsetNoHeader | AcceptCharsetValidHeader | AcceptCharsetInvalidHeader: ...
229229
@overload
230-
def __set__(self, __obj: Any, __value: str | None) -> None: ...
230+
def __set__(self, obj: Any, value: str | None, /) -> None: ...
231231
@overload
232232
def __set__(
233-
self, __obj: Any, __value: AcceptCharsetNoHeader | AcceptCharsetValidHeader | AcceptCharsetInvalidHeader
233+
self, obj: Any, value: AcceptCharsetNoHeader | AcceptCharsetValidHeader | AcceptCharsetInvalidHeader, /
234234
) -> None: ...
235235
@overload
236-
def __set__(self, __obj: Any, __value: SupportsItems[str, float]) -> None: ...
236+
def __set__(self, obj: Any, value: SupportsItems[str, float], /) -> None: ...
237237
@overload
238-
def __set__(self, __obj: Any, __value: _ListOrTuple[str | tuple[str, float] | list[Any]]) -> None: ...
239-
def __delete__(self, __obj: Any) -> None: ...
238+
def __set__(self, obj: Any, value: _ListOrTuple[str | tuple[str, float] | list[Any]], /) -> None: ...
239+
def __delete__(self, obj: Any, /) -> None: ...
240240

241241
def accept_charset_property() -> _AcceptCharsetProperty: ...
242242

@@ -336,22 +336,22 @@ def create_accept_encoding_header(header_value: str) -> AcceptEncodingValidHeade
336336

337337
class _AcceptEncodingProperty:
338338
@overload
339-
def __get__(self, __obj: None, __type: type | None = ...) -> property: ...
339+
def __get__(self, obj: None, type: type | None = ..., /) -> property: ...
340340
@overload
341341
def __get__(
342-
self, __obj: Any, __type: type | None = ...
342+
self, obj: Any, type: type | None = ..., /
343343
) -> AcceptEncodingNoHeader | AcceptEncodingValidHeader | AcceptEncodingInvalidHeader: ...
344344
@overload
345-
def __set__(self, __obj: Any, __value: str | None) -> None: ...
345+
def __set__(self, obj: Any, value: str | None, /) -> None: ...
346346
@overload
347347
def __set__(
348-
self, __obj: Any, __value: AcceptEncodingNoHeader | AcceptEncodingValidHeader | AcceptEncodingInvalidHeader
348+
self, obj: Any, value: AcceptEncodingNoHeader | AcceptEncodingValidHeader | AcceptEncodingInvalidHeader, /
349349
) -> None: ...
350350
@overload
351-
def __set__(self, __obj: Any, __value: SupportsItems[str, float]) -> None: ...
351+
def __set__(self, obj: Any, value: SupportsItems[str, float], /) -> None: ...
352352
@overload
353-
def __set__(self, __obj: Any, __value: _ListOrTuple[str | tuple[str, float] | list[Any]]) -> None: ...
354-
def __delete__(self, __obj: Any) -> None: ...
353+
def __set__(self, obj: Any, value: _ListOrTuple[str | tuple[str, float] | list[Any]], /) -> None: ...
354+
def __delete__(self, obj: Any, /) -> None: ...
355355

356356
def accept_encoding_property() -> _AcceptEncodingProperty: ...
357357

@@ -483,21 +483,21 @@ def create_accept_language_header(header_value: str) -> AcceptLanguageValidHeade
483483

484484
class _AcceptLanguageProperty:
485485
@overload
486-
def __get__(self, __obj: None, __type: type | None = ...) -> property: ...
486+
def __get__(self, obj: None, type: type | None = ..., /) -> property: ...
487487
@overload
488488
def __get__(
489-
self, __obj: Any, __type: type | None = ...
489+
self, obj: Any, type: type | None = ..., /
490490
) -> AcceptLanguageNoHeader | AcceptLanguageValidHeader | AcceptLanguageInvalidHeader: ...
491491
@overload
492-
def __set__(self, __obj: Any, __value: str | None) -> None: ...
492+
def __set__(self, obj: Any, value: str | None, /) -> None: ...
493493
@overload
494494
def __set__(
495-
self, __obj: Any, __value: AcceptLanguageNoHeader | AcceptLanguageValidHeader | AcceptLanguageInvalidHeader
495+
self, obj: Any, value: AcceptLanguageNoHeader | AcceptLanguageValidHeader | AcceptLanguageInvalidHeader, /
496496
) -> None: ...
497497
@overload
498-
def __set__(self, __obj: Any, __value: SupportsItems[str, float]) -> None: ...
498+
def __set__(self, obj: Any, value: SupportsItems[str, float], /) -> None: ...
499499
@overload
500-
def __set__(self, __obj: Any, __value: _ListOrTuple[str | tuple[str, float] | list[Any]]) -> None: ...
501-
def __delete__(self, __obj: Any) -> None: ...
500+
def __set__(self, obj: Any, value: _ListOrTuple[str | tuple[str, float] | list[Any]], /) -> None: ...
501+
def __delete__(self, obj: Any, /) -> None: ...
502502

503503
def accept_language_property() -> _AcceptLanguageProperty: ...

stubs/WebOb/webob/cookies.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ _T = TypeVar("_T")
1717
_SameSitePolicy: TypeAlias = Literal["Strict", "Lax", "None", "strict", "lax", "none"]
1818

1919
class _Serializer(Protocol):
20-
def loads(self, __appstruct: Any) -> bytes: ...
21-
def dumps(self, __bstruct: bytes) -> Any: ...
20+
def loads(self, appstruct: Any, /) -> bytes: ...
21+
def dumps(self, bstruct: bytes, /) -> Any: ...
2222

2323
class RequestCookies(MutableMapping[str, str]):
2424
def __init__(self, environ: WSGIEnvironment) -> None: ...

stubs/WebOb/webob/dec.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ class _unbound_wsgify(wsgify[_RequestT_contra, _P], Generic[_RequestT_contra, _P
151151
@overload
152152
def __call__(self, __self: _S, func: _RequestHandler[_RequestT_contra, _P], /) -> Self: ...
153153
@overload
154-
def __call__(self, __self: _S, req: _RequestT_contra) -> _AnyResponse: ...
154+
def __call__(self, __self: _S, /, req: _RequestT_contra) -> _AnyResponse: ...
155155
@overload
156-
def __call__(self, __self: _S, req: _RequestT_contra, *args: _P.args, **kw: _P.kwargs) -> _AnyResponse: ...
156+
def __call__(self, __self: _S, /, req: _RequestT_contra, *args: _P.args, **kw: _P.kwargs) -> _AnyResponse: ...
157157

158158
class _UnboundMiddleware(Generic[_RequestT_contra, _AppT_contra, _P]):
159159
wrapper_class: type[wsgify[_RequestT_contra, Concatenate[_AppT_contra, _P]]]

stubs/WebOb/webob/descriptors.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ _ContentRangeParams: TypeAlias = (
2828

2929
class _AsymmetricProperty(Generic[_GetterReturnType, _SetterValueType]):
3030
@overload
31-
def __get__(self, __obj: None, __type: type | None = ...) -> property: ...
31+
def __get__(self, obj: None, type: type | None = ..., /) -> property: ...
3232
@overload
33-
def __get__(self, __obj: Any, __type: type | None = ...) -> _GetterReturnType: ...
34-
def __set__(self, __obj: Any, __value: _SetterValueType) -> None: ...
33+
def __get__(self, obj: Any, type: type | None = ..., /) -> _GetterReturnType: ...
34+
def __set__(self, obj: Any, value: _SetterValueType, /) -> None: ...
3535

3636
class _AsymmetricPropertyWithDelete(_AsymmetricProperty[_GetterReturnType, _SetterValueType]):
37-
def __delete__(self, __obj: Any) -> None: ...
37+
def __delete__(self, obj: Any, /) -> None: ...
3838

3939
class _SymmetricProperty(_AsymmetricProperty[_T, _T]): ...
4040
class _SymmetricPropertyWithDelete(_AsymmetricPropertyWithDelete[_T, _T]): ...

stubs/WebOb/webob/etag.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ _ETag: TypeAlias = _AnyETag | _NoETag | ETagMatcher
99

1010
class _ETagProperty:
1111
@overload
12-
def __get__(self, __obj: None, __type: type | None = ...) -> property: ...
12+
def __get__(self, obj: None, type: type | None = ..., /) -> property: ...
1313
@overload
14-
def __get__(self, __obj: Any, __type: type | None = ...) -> _ETag: ...
14+
def __get__(self, obj: Any, type: type | None = ..., /) -> _ETag: ...
1515
@overload
16-
def __set__(self, __obj: Any, __value: str | None) -> None: ...
16+
def __set__(self, obj: Any, value: str | None, /) -> None: ...
1717
@overload
18-
def __set__(self, __obj: Any, __value: _ETag) -> None: ...
19-
def __delete__(self, __obj: Any) -> None: ...
18+
def __set__(self, obj: Any, value: _ETag, /) -> None: ...
19+
def __delete__(self, obj: Any, /) -> None: ...
2020

2121
def etag_property(key: str, default: _ETag, rfc_section: str, strong: bool = True) -> _ETagProperty: ...
2222

stubs/WebOb/webob/multidict.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ _VT = TypeVar("_VT")
1111

1212
class MultiDict(MutableMapping[_KT, _VT]):
1313
@overload
14-
def __init__(self, __m: SupportsItems[_KT, _VT], **kwargs: _VT) -> None: ...
14+
def __init__(self, m: SupportsItems[_KT, _VT], /, **kwargs: _VT) -> None: ...
1515
@overload
16-
def __init__(self, __m: Iterable[tuple[_KT, _VT]], **kwargs: _VT) -> None: ...
16+
def __init__(self, m: Iterable[tuple[_KT, _VT]], /, **kwargs: _VT) -> None: ...
1717
@overload
1818
def __init__(self, **kwargs: _VT) -> None: ...
1919
@classmethod
@@ -46,7 +46,7 @@ class MultiDict(MutableMapping[_KT, _VT]):
4646
def pop(self, key: _KT, default: _T) -> _VT | _T: ...
4747
def popitem(self) -> tuple[_KT, _VT]: ...
4848
@overload # type: ignore[override]
49-
def update(self, __m: Collection[tuple[_KT, _VT]], **kwargs: _VT) -> None: ...
49+
def update(self, m: Collection[tuple[_KT, _VT]], /, **kwargs: _VT) -> None: ...
5050
@overload
5151
def update(self, **kwargs: _VT) -> None: ...
5252
@overload

stubs/aiofiles/aiofiles/tempfile/temptypes.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ class AsyncSpooledTemporaryFile(AsyncBase[_T]):
2020
async def flush(self) -> None: ...
2121
async def isatty(self) -> bool: ...
2222
# All must return `AnyStr`:
23-
async def read(self, __n: int = ...) -> Incomplete: ...
24-
async def readline(self, __limit: int | None = ...) -> Incomplete: ...
25-
async def readlines(self, __hint: int = ...) -> list[Incomplete]: ...
23+
async def read(self, n: int = ..., /) -> Incomplete: ...
24+
async def readline(self, limit: int | None = ..., /) -> Incomplete: ...
25+
async def readlines(self, hint: int = ..., /) -> list[Incomplete]: ...
2626
# ---
2727
async def seek(self, offset: int, whence: int = ...) -> int: ...
2828
async def tell(self) -> int: ...

0 commit comments

Comments
 (0)