Skip to content

Commit

Permalink
Add object self-type to tuple test fixture (#18592)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
ilevkivskyi authored and wesleywright committed Feb 4, 2025
1 parent ebc2cb8 commit f83b643
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test-data/unit/fixtures/tuple.pyi
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Builtins stub used in tuple-related test cases.

import _typeshed
from typing import Iterable, Iterator, TypeVar, Generic, Sequence, Optional, overload, Tuple, Type
from typing import Iterable, Iterator, TypeVar, Generic, Sequence, Optional, overload, Tuple, Type, Self

_T = TypeVar("_T")
_Tco = TypeVar('_Tco', covariant=True)

class object:
def __init__(self) -> None: pass
def __new__(cls) -> Self: ...

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

0 comments on commit f83b643

Please sign in to comment.