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

Completion broken for objects with custom __dir__ method #10977

Closed
takluyver opened this issue Jan 11, 2018 · 4 comments
Closed

Completion broken for objects with custom __dir__ method #10977

takluyver opened this issue Jan 11, 2018 · 4 comments

Comments

@takluyver
Copy link
Member

I think this may have been lost in the switch to Jedi.

Run this code, and then try completing ca.<tab>. No completions are offered.

class CompleteAttrs(object):
    def __getattr__(self, name):
        if name == 'foo':
            return 1
        if name == 'bar':
            return 2
        raise AttributeError(name)
    
    def __dir__(self):
        return ['foo', 'bar'] + object.__dir__(self)

ca = CompleteAttrs()
@Carreau
Copy link
Member

Carreau commented Jan 13, 2018

Might be related to davidhalter/jedi#997

@davidhalter
Copy link

I'm pretty sure this is a separate issue. Please open an issue :)

@takluyver
Copy link
Member Author

Thanks; see davidhalter/jedi#1027

@takluyver takluyver added this to the no action milestone Mar 12, 2018
@takluyver
Copy link
Member Author

The issue in Jedi has been fixed, so this should work from the next Jedi release (0.12?).

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

No branches or pull requests

4 participants