-
Notifications
You must be signed in to change notification settings - Fork 201
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
Add code completions to rope_autoimport
plugin
#471
Conversation
It's weird. Unrelated tests are failing ... |
Tests are reaching the timeout:
Indeed 7 minutes for pytest here seems suspicious, but there is a small chance it could be GitHub temporarily throttling for no good reason. |
@krassowski I see why the test takes so long.
In any case, I do think the config should look more like def pylsp_settings() -> Dict[str, Dict[str, Dict[str, Any]]]:
# Default rope_completion to disabled
return {
"plugins": {
"rope_autoimport": {
"enabled": False, # global "kill switch"
"memory": False,
"completions": {
"enabled": True,
},
"code_actions": {
"enabled": True,
},
}
}
} I will address this tomorrow. Need some sleep now :) |
Couldn't resist @ccordoba12 @krassowski . I think my PR is ready to review now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tkrabel-db for your work on this!
# This makes the test below fail because we access the db from a different thread. | ||
# See https://stackoverflow.com/questions/48218065/objects-created-in-a-thread-can-only-be-used-in-that-same-thread | ||
# @pytest.mark.skipif(IS_WIN, reason="Flaky on Windows") | ||
# def test_autoimport_completions_for_notebook_document( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a chance to recover this test later? I guess if you left it commented here is because you're planning to do it at some point, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I have an upstream PR open to fix this issue so that we can enable that test later.
rope_autoimport
plugin
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, thanks @tkrabel-db!
@krassowski, would you like to give this one another pass? Or should I merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is discussion to be had about how the action kind
is handled (e.g. respecting client preferences from initialization request, advertising it in capabilities
) but it should not block this PR.
Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
Fixes #403
Testing