Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The member variables of a class instance should map to an LSP Field (or Property) #16

Open
rwols opened this issue Jul 6, 2020 · 2 comments

Comments

@rwols
Copy link

rwols commented Jul 6, 2020

class Foo:

    def __init__(self):
        self.x = 1
        self.y = 2


f = Foo()
f.|

Currently, this will report the members x and y as variables, but they should be reported as fields (or properties). If they were reported as field, we can distinguish "regular" class members from "fancy" @property class members (see #15).

@muffinmad
Copy link
Owner

@davidhalter What do you say about this one? Is Jedi interested in returning something like class_variable as the type of the x and y instead of statement? Thanks in advance.

@davidhalter
Copy link

davidhalter commented Jul 20, 2020

I don't see the difference and won't make that change. You will have to do that yourself. I think splitting up the types too much is not a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants