You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
munro
changed the title
Missing Language Server Features (autocomplete, inlay hints,
Missing Language Server Features (autocomplete & inlay hints)
Jun 20, 2024
@munro Can you provide the list of extension that you have installed? You should be able to get a list from ~/.vscode/extensions directory or you can run "Open Extensions Folder" command from VS Code.
@munro This is the description of mypy from its website itself:
Mypy is an optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static typing. Mypy combines the expressive power and convenience of Python with a powerful type system and compile-time type checking. Mypy type checks standard Python programs; run them using any Python VM with basically no runtime overhead.
mypy does just static type checking and is (AFAIK) not suitible as a language server so your feature requests are unsuitable for this extension.
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
pylance
Autocomplete on objects
This may be relayed to the previous, but also getting autocompletes on objects as well
mypy
pylance
Inlay hints
Inlay hint support would be really great too 🥲
mypy
(notice no inlay hints)
pylance
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 PyLancemypy: str
is from MyPy.foo
is anint
, so it should showint
. It appares mypy is showing the coerced type of the variable.The text was updated successfully, but these errors were encountered: