neoclide / coc-python

Python extension for coc.nvim, fork of vscode-python
573 stars 51 forks source link

dataclass signature pop-up shows "The most base type" #277

Open roblevy opened 3 years ago

roblevy commented 3 years ago

I'm using coc-python for Python IDE-like features.

If I define a dataclass I would expect the signature pop-up to show me which fields an instance of this class expects.

Instead I get:

MyClass()
------------------
The most base type

Here is a screenshot which shows the coc-python output:

signature pop-up showing "The most base type"

By contrast, a normal class with an __init__ method shows the expected signature:

pop-up showing correct signature


Minimum working example

from dataclasses import dataclass

@dataclass
class Shape:
    radius: int
    sides: int