Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
eb7c911
[ty] Generic implicit types aliases
sharkdp Nov 21, 2025
c770b2a
Use assignment definition as typevar binding context
sharkdp Nov 24, 2025
4fb0909
Handle attribute expressions as well
sharkdp Nov 24, 2025
24d3693
Handle PEP 613 aliases as well
sharkdp Nov 24, 2025
646c462
Patch panics for stringified annotations for now
sharkdp Nov 24, 2025
225edf1
Rename
sharkdp Nov 24, 2025
d6981e8
Fix value-position specializations
sharkdp Nov 24, 2025
0968622
Fix problem with np.array related to type[T]
sharkdp Nov 25, 2025
a3ee7e8
Stringified annotations
sharkdp Nov 26, 2025
272cb4b
Cleanup
sharkdp Nov 26, 2025
a490411
Adapt tests
sharkdp Nov 27, 2025
7b6ef8a
Add tests for default specialization
sharkdp Nov 27, 2025
801c52b
Rename methods
sharkdp Nov 27, 2025
e13e49c
Fix tests after rebase
sharkdp Nov 27, 2025
f19f005
Workaround for explicitly specialized generic recursive implicit type…
sharkdp Nov 27, 2025
bb4b8e3
Get rid of false positives for Callables
sharkdp Nov 27, 2025
ae781f7
Remove type[T] Todo type
sharkdp Nov 28, 2025
14a7534
formulation
sharkdp Nov 28, 2025
495dfe3
Fix tests after rebase
sharkdp Nov 28, 2025
e9a1d14
Add tuple unpacking test case
sharkdp Nov 28, 2025
b8ae943
Add test case for totally stringified type aliases (which still revea…
sharkdp Nov 28, 2025
9a7231d
Add back TODO comment
sharkdp Nov 28, 2025
267a51e
Another TODO comment
sharkdp Nov 28, 2025
5384ea4
Remove questionable TODO comments
sharkdp Nov 28, 2025
db39fa1
Return CallableType from CallableType::unknown
sharkdp Nov 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/ruff_benchmark/benches/ty_walltime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static COLOUR_SCIENCE: Benchmark = Benchmark::new(
max_dep_date: "2025-06-17",
python_version: PythonVersion::PY310,
},
600,
1070,
);

static FREQTRADE: Benchmark = Benchmark::new(
Expand Down
8 changes: 3 additions & 5 deletions crates/ty_python_semantic/resources/mdtest/async.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ async def main():

result = await task

# TODO: this should be `int`
reveal_type(result) # revealed: Unknown
reveal_type(result) # revealed: int
```

### `asyncio.gather`
Expand All @@ -79,9 +78,8 @@ async def main():
task("B"),
)

# TODO: these should be `int`
reveal_type(a) # revealed: Unknown
reveal_type(b) # revealed: Unknown
reveal_type(a) # revealed: int
reveal_type(b) # revealed: int
Comment on lines +81 to +82
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now understand the _FutureLike type alias.

```

## Under the hood
Expand Down
Loading