Skip to content

Commit 0a6d40b

Browse files
cdce8phauntsaninjaAlexWaygood
authored
Sync typeshed (#17724)
The automatic sync failed due to a merge conflict. Source commit: python/typeshed@661fe27 --------- Co-authored-by: Shantanu <[email protected]> Co-authored-by: AlexWaygood <[email protected]>
1 parent 35679e2 commit 0a6d40b

Some content is hidden

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

76 files changed

+1365
-369
lines changed

misc/typeshed_patches/0001-Revert-sum-literal-integer-change-13961.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 44bc98bd50e7170887f0740b53ed95a8eb04f00e Mon Sep 17 00:00:00 2001
1+
From 58c6a6ab863c1c38e95ccafaf13792ed9c00e499 Mon Sep 17 00:00:00 2001
22
From: Shantanu <[email protected]>
33
Date: Sat, 29 Oct 2022 12:47:21 -0700
44
Subject: [PATCH] Revert sum literal integer change (#13961)
@@ -19,18 +19,18 @@ within mypy, I might pursue upstreaming this in typeshed.
1919
1 file changed, 1 insertion(+), 1 deletion(-)
2020

2121
diff --git a/mypy/typeshed/stdlib/builtins.pyi b/mypy/typeshed/stdlib/builtins.pyi
22-
index 99919c64c..680cd5561 100644
22+
index ea9f8c894..a6065cc67 100644
2323
--- a/mypy/typeshed/stdlib/builtins.pyi
2424
+++ b/mypy/typeshed/stdlib/builtins.pyi
25-
@@ -1596,7 +1596,7 @@ _SupportsSumNoDefaultT = TypeVar("_SupportsSumNoDefaultT", bound=_SupportsSumWit
25+
@@ -1653,7 +1653,7 @@ _SupportsSumNoDefaultT = TypeVar("_SupportsSumNoDefaultT", bound=_SupportsSumWit
2626
# without creating many false-positive errors (see #7578).
2727
# Instead, we special-case the most common examples of this: bool and literal integers.
2828
@overload
29-
-def sum(iterable: Iterable[bool | _LiteralInteger], /, start: int = 0) -> int: ... # type: ignore[overload-overlap]
30-
+def sum(iterable: Iterable[bool], /, start: int = 0) -> int: ... # type: ignore[overload-overlap]
29+
-def sum(iterable: Iterable[bool | _LiteralInteger], /, start: int = 0) -> int: ...
30+
+def sum(iterable: Iterable[bool], /, start: int = 0) -> int: ...
3131
@overload
3232
def sum(iterable: Iterable[_SupportsSumNoDefaultT], /) -> _SupportsSumNoDefaultT | Literal[0]: ...
3333
@overload
3434
--
35-
2.39.3 (Apple Git-146)
35+
2.46.0
3636

0 commit comments

Comments
 (0)