microsoft / microsoft/vscode-mypy

Missing Language Server Features (autocomplete & inlay hints)

Open
#306 3 comments 4 reactions 1 assignee Claimed by @karthiknadig View on GitHub
bug triage-needed
Dominant language
Python
Stars
150
Forks
39
Avg merge
21h 45m
Merged PRs (30d)
8

Description

There are a lot of things that are working, so this is a really great extension! But I noticed some helpful features are still missing.

# Autocomplete on imports

It would be really nice if we could autocomplete imports from mypy!

## mypy
image

## pylance

image

# Autocomplete on objects

This may be relayed to the previous, but also getting autocompletes on objects as well

## mypy

image

## pylance

image

# Inlay hints

Inlay hint support would be really great too 🥲

image

## mypy

(notice no inlay hints)
image

## pylance

image

# String interpolation shows wrong type

And this was a subtle issue I noticed, it shows the wrong type when hovering over a variable used in string interpolation.

* `(variable) foo: int` is from PyLance
* and `mypy: str` is from MyPy.

`foo` is an `int`, so it should show `int`. It appares mypy is showing the coerced type of the variable.

image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.