Use lowercase tuple where possible (#6170)

This commit is contained in:
Akuli
2021-10-15 00:18:19 +00:00
committed by GitHub
parent 5f386b0575
commit 994b69ef8f
242 changed files with 1212 additions and 1224 deletions

View File

@@ -1,6 +1,6 @@
import string
import sys
from typing import Any, Callable, Iterable, Mapping, Sequence, Text, Tuple
from typing import Any, Callable, Iterable, Mapping, Sequence, Text
from typing_extensions import SupportsIndex
from markupsafe._compat import text_type
@@ -22,8 +22,8 @@ class Markup(text_type):
def striptags(self) -> Text: ...
@classmethod
def escape(cls, s: text_type) -> Markup: ... # noqa: F811
def partition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...
def rpartition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...
def partition(self, sep: text_type) -> tuple[Markup, Markup, Markup]: ...
def rpartition(self, sep: text_type) -> tuple[Markup, Markup, Markup]: ...
def format(self, *args: Any, **kwargs: Any) -> Markup: ...
def __html_format__(self, format_spec: text_type) -> Markup: ...
def __getslice__(self, start: int, stop: int) -> Markup: ...

View File

@@ -1,12 +1,12 @@
import sys
from typing import Iterator, Mapping, Tuple, TypeVar
from typing import Iterator, Mapping, TypeVar
_K = TypeVar("_K")
_V = TypeVar("_V")
PY2: bool
def iteritems(d: Mapping[_K, _V]) -> Iterator[Tuple[_K, _V]]: ...
def iteritems(d: Mapping[_K, _V]) -> Iterator[tuple[_K, _V]]: ...
if sys.version_info >= (3,):
text_type = str