Skip to content

[TSP][Pyrefly][Completion] Auto-import completions don't work #7951

@kinto0

Description

@kinto0

Environment data

TSP settings:

    "python.analysis.enableExternalTypeServer": true,
    "python.analysis.typeServerArguments": [
        "tsp"
    ],
    "python.analysis.typeServerExecutable": "/Users/kylei/projects/test/.venv/bin/pyrefly"
  • Pylance version: 2026.1.102
  • OS: Mac
  • Python version (& distribution if applicable, e.g. Anaconda): 3.13.8 using UV
  • Pyrefly version:
(test) testkylei@kylei-mbp test % pyrefly --version
pyrefly 0.58.0

Code Snippet

TypeVa|

->
See no completions

Expected behavior

Auto import completion for from <> import TypeVar

I can also reproduce this for adjacent file import completions:

foo.py # def test(): ...
foo2.py # tes| # no completions

Pyrefly extension

Image

Metadata

Metadata

Assignees

Labels

ai-triage-respondedIndicate whether the AI triage agent has responded to this issue.team needs to reproduceIssue has not been reproduced yettsp-pyreflyIssues related to using pyrefly as a TSP server

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions