pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

No autocomplete suggestions for PEP 695 type aliases

Open cdce8p opened this issue 1 year ago • 0 comments

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

  1. Create lib.py file
  2. In the same folder, create a test.py file and open it
  3. Look for autocomplete suggestions for both my_func and MyAlias

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.

cdce8p avatar Oct 09 '24 17:10 cdce8p