Skip to content

Commit 17431f1

Browse files
committed
wip
1 parent c8942cb commit 17431f1

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

crates/ty_python_semantic/resources/mdtest/attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,7 @@ d = True
19161916
reveal_type(d.__class__) # revealed: <class 'bool'>
19171917

19181918
e = (42, 42)
1919-
reveal_type(e.__class__) # revealed: <class 'tuple[Literal[42], Literal[42]]'>
1919+
reveal_type(e.__class__) # revealed: type[tuple[Literal[42], Literal[42]]]
19201920

19211921
def f(a: int, b: typing_extensions.LiteralString, c: int | str, d: type[str]):
19221922
reveal_type(a.__class__) # revealed: type[int]

crates/ty_python_semantic/resources/mdtest/mdtest_custom_typeshed.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,18 @@ simple untyped definition is enough to make `reveal_type` work in tests:
9797
typeshed = "/typeshed"
9898
```
9999

100+
`/typeshed/stdlib/builtins.pyi`:
101+
102+
```pyi
103+
class tuple: ...
104+
```
105+
100106
`/typeshed/stdlib/typing_extensions.pyi`:
101107

102108
```pyi
103109
def reveal_type(obj, /): ...
104110
```
105111

106112
```py
107-
reveal_type(()) # revealed: tuple[()]
113+
reveal_type(()) # revealed: tuple
108114
```

0 commit comments

Comments
 (0)