Conversation
|
I'm not sure what this PR tries to achieve. What's the behavior before and after this change? |
|
The goal of this PR is that when typing out an import for a module (numpy for example) I don't know the status of this PR, it's been on my list to review for a bit; I worked with @etiennerichart on it but haven't been paying attention for a couple months now. |
|
Ah, yes, that's indeed useful. |
|
We just removed 0.20 to fix compatibility with Python 3.9 and now dropped support for Python 2 in master. The latter touched almost the whole code base. Could you please rebase this PR on top of current master? Thanks |
| return attr_matches(name, prefix="", only_modules=True) | ||
|
|
||
|
|
||
| def try_to_import(module_name): |
There was a problem hiding this comment.
Is this really necessary? Shouldn't those modules already be found by our normal module processing routines?
1d22675 to
4ebd9bc
Compare
|
I have not been able to test functionality yet since I'm having trouble starting bpython on my PC. I'm getting the following error: |
|
As far as I can tell, the PR works as expected. I'm just not sure if we need the additional module discovery code. |
|
Okay, I took a look at this PR again. I don't think we should merge it in its current state. But I don't think we should add a curtsies specific workaround that breaks abstraction. |
when typed: from import <> and tab is pressed will background import the module to get better autocomplete options. Note: If nothing is yet typed after the import the autocomplete will not show any options.