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

Lines changed: 2 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy