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
__all__ feature, improvement to dir2, and tests for both #1529
Conversation
Signed-off-by: Tim Couper <drtimcouper@gmail.com>
Signed-off-by: Tim Couper <drtimcouper@gmail.com>
… to 0 fix: the doctest to reflect the new limit_to__all__ Signed-off-by: Tim Couper <drtimcouper@gmail.com>
I've realized that this feature is potentially a bit dangerous, as modules don't always keep their In any case, since the feature is off by default, it won't bite anyone by accident. Advanced users can decide to activate it and it will be their responsibility to be aware of what happens. Furthermore, since it can be easily toggled at runtime with The implementation looks clean, and with good tests, so I'm merging it (after review and also interactive testing). Many thanks for the contribution and the persistence of going through 3 PRs :) And also thanks @takluyver for your diligent work on it! |
Implement new configurable flag to control tab completion on modules that implement the __all__ attribute: IPCompleter.limit_to__all__= Boolean. Instruct the completer to use __all__ for the completion Specifically, when completing on ``object.<tab>``. When True: only those names in obj.__all__ will be included. When False [default]: the __all__ attribute is ignored.
Implement new configurable flag to control tab completion on modules that implement the __all__ attribute: IPCompleter.limit_to__all__= Boolean. Instruct the completer to use __all__ for the completion Specifically, when completing on ``object.<tab>``. When True: only those names in obj.__all__ will be included. When False [default]: the __all__ attribute is ignored.
The 2 patches (relating to
__all__
anddir2
) are applied, plus the CBool change and a couple of tests to confirm the correct behaviour of complete with, and without,limit_to__all__
being set