microsoft / python-language-server

Microsoft Language Server for Python
Apache License 2.0
915 stars 133 forks source link

Class Parameter Hints do not show up when inheriting from NamedTuple #2029

Open sbland opened 4 years ago

sbland commented 4 years ago

Class parameter hints should show above docstring on intellisense when using typing.NamedTuple

Environment data

Example

from typing import NamedTuple

class Config_Shape(NamedTuple):
    x: int
    y: int

Intellisense now shows the parameters for NamedTuple rather than Config_Shape. I.e. typename: str, fields: Iter..

jlxgcgcg commented 4 years ago

👍 this is a big nuisance

joelgrus commented 4 years ago

btw, it seems like pylance fixes this

jakebailey commented 4 years ago

Yep (along with many other things 🙂).

https://devblogs.microsoft.com/python/announcing-pylance-fast-feature-rich-language-support-for-python-in-visual-studio-code/

levihb commented 4 years ago

I'm also having this issue.

I don't think it's just a lack of a feature though? Because it was initially brought up in #15, then I believe added in #339? Or am I misunderstanding that?