From 2d146e7da273ae1eb874404deeb17d6dbd505bde Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:06:25 -0800 Subject: [PATCH] Use PEP 570 syntax in comments (#11552) --- stdlib/_decimal.pyi | 2 +- stdlib/_typeshed/dbapi.pyi | 2 +- stdlib/zipfile/__init__.pyi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/_decimal.pyi b/stdlib/_decimal.pyi index 826cbe360..90d16215c 100644 --- a/stdlib/_decimal.pyi +++ b/stdlib/_decimal.pyi @@ -182,7 +182,7 @@ class Context: # even settable attributes like `prec` and `rounding`, # but that's inexpressable in the stub. # Type checkers either ignore it or misinterpret it - # if you add a `def __delattr__(self, __name: str) -> NoReturn` method to the stub + # if you add a `def __delattr__(self, name: str, /) -> NoReturn` method to the stub prec: int rounding: str Emin: int diff --git a/stdlib/_typeshed/dbapi.pyi b/stdlib/_typeshed/dbapi.pyi index 7888fc2ba..d54fbee57 100644 --- a/stdlib/_typeshed/dbapi.pyi +++ b/stdlib/_typeshed/dbapi.pyi @@ -23,7 +23,7 @@ class DBAPICursor(Protocol): @property def rowcount(self) -> int: ... # optional: - # def callproc(self, __procname: str, __parameters: Sequence[Any] = ...) -> Sequence[Any]: ... + # def callproc(self, procname: str, parameters: Sequence[Any] = ..., /) -> Sequence[Any]: ... def close(self) -> object: ... def execute(self, operation: str, parameters: Sequence[Any] | Mapping[str, Any] = ..., /) -> object: ... def executemany(self, operation: str, seq_of_parameters: Sequence[Sequence[Any]], /) -> object: ... diff --git a/stdlib/zipfile/__init__.pyi b/stdlib/zipfile/__init__.pyi index 708212dbe..b61e07f8b 100644 --- a/stdlib/zipfile/__init__.pyi +++ b/stdlib/zipfile/__init__.pyi @@ -44,7 +44,7 @@ class _ZipStream(Protocol): # The following methods are optional: # def seekable(self) -> bool: ... # def tell(self) -> int: ... - # def seek(self, __n: int) -> object: ... + # def seek(self, n: int, /) -> object: ... # Stream shape as required by _EndRecData() and _EndRecData64(). class _SupportsReadSeekTell(Protocol):