Skip to content

Commit f83b643

Browse files
ilevkivskyiwesleywright
authored andcommitted
Add object self-type to tuple test fixture (#18592)
This makes it more similar to the real typeshed. It is needed to reproduce tricky failures in tests, e.g. #18585. If this causes slower tests, some tests may be switched to `tuple-simple.pyi`.
1 parent ebc2cb8 commit f83b643

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test-data/unit/fixtures/tuple.pyi

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Builtins stub used in tuple-related test cases.
22

33
import _typeshed
4-
from typing import Iterable, Iterator, TypeVar, Generic, Sequence, Optional, overload, Tuple, Type
4+
from typing import Iterable, Iterator, TypeVar, Generic, Sequence, Optional, overload, Tuple, Type, Self
55

66
_T = TypeVar("_T")
77
_Tco = TypeVar('_Tco', covariant=True)
88

99
class object:
1010
def __init__(self) -> None: pass
11+
def __new__(cls) -> Self: ...
1112

1213
class type:
1314
def __init__(self, *a: object) -> None: pass

0 commit comments

Comments
 (0)