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

Autocompletion Issue on Field of Field #1275

Closed
mlangkabel opened this issue Jan 29, 2019 · 2 comments
Closed

Autocompletion Issue on Field of Field #1275

mlangkabel opened this issue Jan 29, 2019 · 2 comments

Comments

@mlangkabel
Copy link
Contributor

Hi, currently I am the main author of the SourcetrailPythonIndexer, which we are basing on Jedi. First of all, thank you for providing and maintaining this great project!

However, when running Jedi on the following code, I encountered some strange behavior:

class Bar:
    pass

class Foo:
    def __init__(self):
        self.bar = Bar()
        self.bar.baz = 9

foo = Foo()
baz = foo.bar.baz
print(baz)

Running Jedi to complete on baz = foo. (2nd last line) results in bar and baz, even though baz is not a field of Foo.
Running Jedi to complete on baz = foo.bar. does not result in any completions.

@davidhalter
Copy link
Owner

Thanks for finding this. baz definitely shouldn't be a completion. However foo.bar. won't return baz, it will only return all the underscore methods. This makes sense. side effects on classes are not supported in Jedi (yet).

BTW: Please make sure to subscribe to #1063.

@mlangkabel
Copy link
Contributor Author

Thank you for looking into this!

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

2 participants