pylance-release
pylance-release copied to clipboard
No autocomplete suggestions for PEP 695 type aliases
Environment data
- Pylance version: v2024.10.1
- Python version: 3.13.0
Code Snippet
# lib.py
def my_func() -> None: ...
type MyAlias = int | str | None: ...
Repro Steps
- Create
lib.pyfile - In the same folder, create a
test.pyfile and open it - Look for autocomplete suggestions for both
my_funcandMyAlias
Expected behavior
Similar to my_func I'd have expected an autocomplete suggestion for MyAlias.
Actual behavior
No suggestion for MyAlias.
Settings
{
"python.analysis.typeCheckingMode": "strict",
"python.analysis.indexing": true,
"python.analysis.includeAliasesFromUserFiles": true
}
Not sure what includeAliasesFromUserFiles actual does (i.e. which alias symbols are supposed to show up) but changing it doesn't seem to have any effect.