From 564b5c9693b1eefbaf48ce6623e59979bc5dc06b Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 15 Feb 2022 12:38:14 +0000 Subject: [PATCH 1/4] Fix positional-only differences in `sqlite3` --- stdlib/sqlite3/dbapi2.pyi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stdlib/sqlite3/dbapi2.pyi b/stdlib/sqlite3/dbapi2.pyi index 7e0d2e6a0d33..63408eea4a34 100644 --- a/stdlib/sqlite3/dbapi2.pyi +++ b/stdlib/sqlite3/dbapi2.pyi @@ -183,7 +183,7 @@ class Connection: def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __enter__(self: Self) -> Self: ... - def __exit__(self, t: type | None, exc: BaseException | None, tb: Any | None) -> None: ... + def __exit__(self, __t: type | None, __exc: BaseException | None, __tb: Any | None) -> None: ... class Cursor(Iterator[Any]): arraysize: Any @@ -233,16 +233,16 @@ class ProgrammingError(DatabaseError): ... class Row: def __init__(self, *args: Any, **kwargs: Any) -> None: ... def keys(self): ... - def __eq__(self, other): ... - def __ge__(self, other): ... - def __getitem__(self, index): ... - def __gt__(self, other): ... + def __eq__(self, __other): ... + def __ge__(self, __other): ... + def __getitem__(self, __index): ... + def __gt__(self, __other): ... def __hash__(self): ... def __iter__(self): ... - def __le__(self, other): ... + def __le__(self, __other): ... def __len__(self): ... - def __lt__(self, other): ... - def __ne__(self, other): ... + def __lt__(self, __other): ... + def __ne__(self, __other): ... if sys.version_info < (3, 8): class Statement: From 1c9766db5792a79c9a2c8b15a12b26a61b05263b Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 15 Feb 2022 06:13:49 -0800 Subject: [PATCH 2/4] Update stdlib/sqlite3/dbapi2.pyi --- stdlib/sqlite3/dbapi2.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/sqlite3/dbapi2.pyi b/stdlib/sqlite3/dbapi2.pyi index 63408eea4a34..7e761ab1e7ae 100644 --- a/stdlib/sqlite3/dbapi2.pyi +++ b/stdlib/sqlite3/dbapi2.pyi @@ -183,7 +183,7 @@ class Connection: def __call__(self, *args: Any, **kwargs: Any) -> Any: ... def __enter__(self: Self) -> Self: ... - def __exit__(self, __t: type | None, __exc: BaseException | None, __tb: Any | None) -> None: ... + def __exit__(self, __type: type | None, __value: BaseException | None, __traceback: Any | None) -> Literal[False]: ... class Cursor(Iterator[Any]): arraysize: Any From fb1f26c6ebf3ee94105c0f22d87a7f3121b34982 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Tue, 15 Feb 2022 06:14:06 -0800 Subject: [PATCH 3/4] add import --- stdlib/sqlite3/dbapi2.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/sqlite3/dbapi2.pyi b/stdlib/sqlite3/dbapi2.pyi index 7e761ab1e7ae..ac0446d61fe7 100644 --- a/stdlib/sqlite3/dbapi2.pyi +++ b/stdlib/sqlite3/dbapi2.pyi @@ -2,7 +2,7 @@ import sys from _typeshed import Self, StrOrBytesPath from datetime import date, datetime, time from typing import Any, Callable, Generator, Iterable, Iterator, Protocol, TypeVar -from typing_extensions import final +from typing_extensions import final, Literal _T = TypeVar("_T") From 0d436f946f964dc6a9042d3938737af144ee049d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Feb 2022 14:15:16 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/sqlite3/dbapi2.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/sqlite3/dbapi2.pyi b/stdlib/sqlite3/dbapi2.pyi index ac0446d61fe7..98debc00f317 100644 --- a/stdlib/sqlite3/dbapi2.pyi +++ b/stdlib/sqlite3/dbapi2.pyi @@ -2,7 +2,7 @@ import sys from _typeshed import Self, StrOrBytesPath from datetime import date, datetime, time from typing import Any, Callable, Generator, Iterable, Iterator, Protocol, TypeVar -from typing_extensions import final, Literal +from typing_extensions import Literal, final _T = TypeVar("_T")