-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ty] Sync vendored typeshed stubs #20876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
1479473
b5fdf0f
0d316a0
6da37c2
54f5e17
078df1c
2107825
d6c8dfe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,5 +84,5 @@ python-version = "3.10" | |
| X = int | str | ||
|
|
||
| def f(y: X): | ||
| reveal_type(y) # revealed: @Todo(Support for `types.UnionType` instances in type expressions) | ||
| reveal_type(y) # revealed: @Todo(Support for `types.UnionType` instances in type expressions) | int | ||
|
||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 91055c730ffcda6311654cf32d663858ece69bad | ||
| d6f4a0f7102b1400a21742cf9b7ea93614e2b6ec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also "breaks" because we previously inferred a
@Todotype, and@Todotypes are generally hidden ... (why?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only specifically TypeAlias-related TODOs are suppressed from autocompletions:
ruff/crates/ty_python_semantic/src/types/ide_support.rs
Line 272 in 4fc7dd3
We never want private type aliases appearing in autocompletions. The special Todo variant was the best way I could think of doing this without PEP-613 support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instances of UnionType are also suppressed, because they're almost certainly implicit type aliases, and we don't support them yet either, but we never want private type aliases from stubs appearing in autocompletions because they don't exist at runtime:
ruff/crates/ty_python_semantic/src/types/ide_support.rs
Line 262 in 4fc7dd3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why it breaks, because now it's
UnionType | <class 'int'>.