-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Source commit: python/typeshed@2370b8b
- Loading branch information
Showing
75 changed files
with
4,655 additions
and
3,349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
From 3ec9b878d6bbe3fae64a508a62372f10a886406f Mon Sep 17 00:00:00 2001 | ||
From b4259edd94188f9e4cc77a22e768eea183a32053 Mon Sep 17 00:00:00 2001 | ||
From: Shantanu <[email protected]> | ||
Date: Mon, 26 Sep 2022 12:55:07 -0700 | ||
Subject: [PATCH] Remove use of LiteralString in builtins (#13743) | ||
|
||
--- | ||
mypy/typeshed/stdlib/builtins.pyi | 95 ------------------------------- | ||
1 file changed, 95 deletions(-) | ||
mypy/typeshed/stdlib/builtins.pyi | 100 +----------------------------- | ||
1 file changed, 1 insertion(+), 99 deletions(-) | ||
|
||
diff --git a/mypy/typeshed/stdlib/builtins.pyi b/mypy/typeshed/stdlib/builtins.pyi | ||
index 53e00ec6a..bad3250ef 100644 | ||
index 63c53a5f6..d55042b56 100644 | ||
--- a/mypy/typeshed/stdlib/builtins.pyi | ||
+++ b/mypy/typeshed/stdlib/builtins.pyi | ||
@@ -61,7 +61,6 @@ from typing import ( # noqa: Y022 | ||
@@ -63,7 +63,6 @@ from typing import ( # noqa: Y022 | ||
from typing_extensions import ( # noqa: Y023 | ||
Concatenate, | ||
Literal, | ||
- LiteralString, | ||
ParamSpec, | ||
Self, | ||
TypeAlias, | ||
@@ -435,31 +434,16 @@ class str(Sequence[str]): | ||
@@ -438,31 +437,16 @@ class str(Sequence[str]): | ||
def __new__(cls, object: object = ...) -> Self: ... | ||
@overload | ||
def __new__(cls, object: ReadableBuffer, encoding: str = ..., errors: str = ...) -> Self: ... | ||
|
@@ -51,7 +51,7 @@ index 53e00ec6a..bad3250ef 100644 | |
def format(self, *args: object, **kwargs: object) -> str: ... | ||
def format_map(self, mapping: _FormatMapMapping, /) -> str: ... | ||
def index(self, sub: str, start: SupportsIndex | None = ..., end: SupportsIndex | None = ..., /) -> int: ... | ||
@@ -475,99 +459,35 @@ class str(Sequence[str]): | ||
@@ -478,99 +462,35 @@ class str(Sequence[str]): | ||
def isspace(self) -> bool: ... | ||
def istitle(self) -> bool: ... | ||
def isupper(self) -> bool: ... | ||
|
@@ -151,7 +151,7 @@ index 53e00ec6a..bad3250ef 100644 | |
def zfill(self, width: SupportsIndex, /) -> str: ... # type: ignore[misc] | ||
@staticmethod | ||
@overload | ||
@@ -578,9 +498,6 @@ class str(Sequence[str]): | ||
@@ -581,39 +501,21 @@ class str(Sequence[str]): | ||
@staticmethod | ||
@overload | ||
def maketrans(x: str, y: str, z: str, /) -> dict[int, int | None]: ... | ||
|
@@ -161,8 +161,13 @@ index 53e00ec6a..bad3250ef 100644 | |
def __add__(self, value: str, /) -> str: ... # type: ignore[misc] | ||
# Incompatible with Sequence.__contains__ | ||
def __contains__(self, key: str, /) -> bool: ... # type: ignore[override] | ||
@@ -589,25 +506,13 @@ class str(Sequence[str]): | ||
def __getitem__(self, key: SupportsIndex | slice, /) -> str: ... | ||
def __eq__(self, value: object, /) -> bool: ... | ||
def __ge__(self, value: str, /) -> bool: ... | ||
- @overload | ||
- def __getitem__(self: LiteralString, key: SupportsIndex | slice, /) -> LiteralString: ... | ||
- @overload | ||
- def __getitem__(self, key: SupportsIndex | slice, /) -> str: ... # type: ignore[misc] | ||
+ def __getitem__(self, key: SupportsIndex | slice, /) -> str: ... | ||
def __gt__(self, value: str, /) -> bool: ... | ||
def __hash__(self) -> int: ... | ||
- @overload | ||
|
@@ -188,5 +193,5 @@ index 53e00ec6a..bad3250ef 100644 | |
def __getnewargs__(self) -> tuple[str]: ... | ||
|
||
-- | ||
2.45.2 | ||
2.47.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.