Skip to content

Commit bf484ab

Browse files
Add @disjoint_base to builtins.tuple (#14683)
1 parent 013cef0 commit bf484ab

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

stdlib/@tests/stubtest_allowlists/common.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ importlib.abc.PathEntryFinder.find_spec # Not defined on the actual class, but
1010
tkinter.simpledialog.[A-Z_]+
1111
tkinter.simpledialog.TclVersion
1212
tkinter.simpledialog.TkVersion
13-
builtins.tuple # should have @disjoint_base but hits pyright issue
1413
tarfile.TarInfo.__slots__ # it's a big dictionary at runtime and the dictionary values are a bit long
1514

1615

stdlib/builtins.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,8 +1021,7 @@ class slice(Generic[_StartT_co, _StopT_co, _StepT_co]):
10211021

10221022
def indices(self, len: SupportsIndex, /) -> tuple[int, int, int]: ...
10231023

1024-
# Making this a disjoint_base upsets pyright
1025-
# @disjoint_base
1024+
@disjoint_base
10261025
class tuple(Sequence[_T_co]):
10271026
def __new__(cls, iterable: Iterable[_T_co] = ..., /) -> Self: ...
10281027
def __len__(self) -> int: ...

0 commit comments

Comments
 (0)