all: Drop legacy Tuple.

This commit is contained in:
Laurens Valk
2026-08-25 12:39:49 +02:00
parent d3ba6154f0
commit e0821fade4
6 changed files with 10 additions and 17 deletions
+2
View File
@@ -139,8 +139,10 @@ nitpick_ignore.append(("py:obj", "typing.IO"))
# MaybeAwaitable* stub types have no documented target; the awaitable
# extension renders them as an "await" prefix instead, but the raw names can
# still leak into signatures (e.g. overloads), so suppress those warnings.
# Likewise, collections.abc types have no link target without intersphinx.
nitpick_ignore_regex = [
("py:class", r"MaybeAwaitable\w*"),
("py:class", r"collections\.abc\.\w+"),
]
# -- Autodoc options ------------------------------------------------------
+3 -6
View File
@@ -29,7 +29,6 @@ from typing import (
SupportsComplex,
SupportsFloat,
SupportsInt,
Tuple,
TypeVar,
Union,
overload,
@@ -205,9 +204,7 @@ class bytearray:
def __init__(self, source: _int) -> None: ...
@overload
def __init__(
self, source: _bytes | _bytearray | _str | Iterable[_int]
) -> None: ...
def __init__(self, source: _bytes | _bytearray | _str | Iterable[_int]) -> None: ...
def __init__(self, *args):
r"""
@@ -366,7 +363,7 @@ def divmod(a: _float, b: _float) -> tuple[_float, _float]: ...
def divmod(a, b):
"""
divmod(a, b) -> Tuple[int, int]
divmod(a, b) -> tuple[int, int]
Gets the quotient and remainder for dividing two integers.
@@ -1396,7 +1393,7 @@ class type:
def zip(*iterables: Iterable) -> Iterable[builtins.tuple]:
"""
zip(iter_a, iter_b, ...) -> Iterable[Tuple]
zip(iter_a, iter_b, ...) -> Iterable[tuple]
Returns an iterator of tuples, where the *i*-th tuple contains the *i*-th
element from each of the argument sequences or iterables. The iterator
+1 -1
View File
@@ -9,7 +9,7 @@
Convert between Python objects and the JSON data format.
"""
from typing import IO, Any, Tuple
from typing import IO, Any
def dump(object: Any, stream: IO, separators: tuple[str, str] = (", ", ": ")):
+2 -4
View File
@@ -11,8 +11,6 @@
Math functions.
"""
from typing import Tuple as Tuple
e = 2.718282
"""The mathematical constant e."""
@@ -264,7 +262,7 @@ def fabs(x: float) -> float:
def modf(x: float) -> tuple[float, float]:
"""modf(x) -> Tuple[float, float]
"""modf(x) -> tuple[float, float]
Gets the fractional and integral parts of ``x``, both with the same sign
as ``x``.
@@ -280,7 +278,7 @@ def modf(x: float) -> tuple[float, float]:
def frexp(x: float) -> tuple[float, int]:
"""frexp(x) -> Tuple[float, float]
"""frexp(x) -> tuple[float, float]
Decomposes a value ``x`` into a
tuple ``(m, p)``, such that ``x == m * (2 ** p)``.
+2 -4
View File
@@ -10,8 +10,6 @@ This module provides functions to convert between Python values and C-like
data structs.
"""
from typing import Tuple, Union
def calcsize(format: str) -> int:
"""
@@ -55,7 +53,7 @@ def pack_into(format: str, buffer: bytearray, offset: int, *values) -> bytes:
def unpack(format: str, data: bytes | bytearray) -> tuple:
"""
unpack(format, data) -> Tuple
unpack(format, data) -> tuple
Decodes the binary data using the given format.
@@ -70,7 +68,7 @@ def unpack(format: str, data: bytes | bytearray) -> tuple:
def unpack_from(format: str, data: bytes | bytearray, offset: int) -> tuple:
"""
unpack_from(format, data, offset) -> Tuple
unpack_from(format, data, offset) -> tuple
Decodes binary data from a buffer using the given format.
-2
View File
@@ -9,8 +9,6 @@
This module provides a subset of the standard Python ``sys`` module.
"""
from typing import Tuple
from uio import FileIO as _FileIO
stdin: _FileIO = _FileIO()