-
Notifications
You must be signed in to change notification settings - Fork 204
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 a plugin to provide autoimport functionality #199
Conversation
…already in document
Other smaller changes: - Allow memory only database for testing. - Configuration parameter for memory database
so this is almost ready:
|
Some notes about the future of this. I'm working on splitting it out to its own repository where 1-3 things will happen.
But for now, this is perfectly functional code |
Yes, but its probably better to mark it off by default, and explain that it is experimental unless it is replaced in jedi/rope |
Agreed, that's fine for me too. |
Can I help somehow to make this happen? |
If Jedi manifested a should_insert API, that'd help - but isn't necessary for the merge. I'm not sure what else is needed. |
I didn't know this was ready. I'll try to review it this week so we can include it in our next version. |
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 a lot @bagel897 for your work on this! I left a very lightweight review for you, mostly about style issues. Otherwise looks good to me.
Co-authored-by: Carlos Cordoba <[email protected]>
Co-authored-by: Carlos Cordoba <[email protected]>
…server into autoimport
Pushed a bugfix and the style changes. Let me know if there's anything else (or if the CI fails, I'll check). You might want to squash the PR, since its a lot of poorly labeled commits, but up to you. Thanks for the feedback @ccordoba12! |
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 for addressing my previous review @bagel897! One last suggestion for you then this should be ready.
Don't worry about that, we squash merge all PRs in this repo. |
Co-authored-by: Carlos Cordoba <[email protected]>
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 @bagel897 for this addition! It's a great improvement!!
Autoimport plugin for pylsp
Depends on accompanying pull request in rope
@bagel897
Closes #34
Prereqs
Rope > 1.0.0 (AKA git builds rn)
Demo Images
can detect external modules
grabs names from the external modules
Features
Will take suggestions on how to improve the basic algorithm
Besides the cache generation, it preforms fine on my machine
Most of the test cases are to cover this and it should be pretty functional.
the main ones are in parsing existing names and whether to suggest imports
Won't fix
__init__.py
modules. Would be difficult to preform type inference on.