Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

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

Open

Description

@sbland

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

Environment data

  • VS Code version: 1.45.0
  • Extension version 2020.4.76186
  • OS and version: Ubuntu 18.04.4 LTS
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.9
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version vscode-python#3977): Jedi Enabled
  • Value of the python.languageServer setting: Microsof

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..

Activity

  1. jlxgcgcg commented on Jun 15, 2020

    @jlxgcgcg

    👍 this is a big nuisance

  2. joelgrus commented on Jul 1, 2020

    @joelgrus

    btw, it seems like pylance fixes this

  3. levihb commented on Sep 6, 2020

    @levihb

    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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions