pythonic-emacs / anaconda-mode

Code navigation, documentation lookup and completion for Python.
GNU General Public License v3.0
707 stars 87 forks source link

Completion for dataclasses #361

Closed quicknir closed 4 years ago

quicknir commented 5 years ago

This could be another issue in my setup, but I can't seem to get completion for dataclasses to work.

from dataclasses import dataclass

@dataclass
class Student:
    name: str
    id_num: int

class User:
    def __init__(self, name, id_num):
        self.name = name
        self.id_num = id_num

def foo(s: Student, u: User):
    pass
    # I get completion on u. but not on s.
CeleritasCelery commented 4 years ago

I am not able to reproduce this. Using your same example I get completions for s. Version 0.15.0 of Jedi added support for dataclasses. Which version are you using?

CeleritasCelery commented 4 years ago

Actually is looks like that version of Jedi was released after you filed you issue. Please Update and test again.