importmagic
importmagic copied to clipboard
ranking within 3rd party libraries?
when working with django, django & lot of 3rd packages for django have same models, views e.t.c
If i try to import models.Model
or User
it shows import options in the following order
Is it possible to move the django imports to top? Can we have a user based ranking or caching the imported imports & ranking them a bit higher? Or is there any other option?
That's certainly possible. Currently rankings are assigned at parse time, but I can imagine adding after-the-fact reranking of modules.
In the context of elpy, elpy would inform the backend about the user choice, and the package/module selected by the user would get a tiny ranking increment.
The problem is how to persist that ranking. Sooner or later we'll have to cache the index somewhere, but it falls on elpy to manage that per project.