pydoc.vim
pydoc.vim copied to clipboard
"bar" documentation not found if imported as "from foo import bar"
When modules are imported as from foo import bar the plugin fails to find the documentation of bar.
For instance, <leader>pw on bar in the following code will result in no Python documentation found:
from foo import bar
my_var = bar(my_args)
while <leader>pW on bar in the following code works as expected:
import foo.bar
my_var = foo.bar(my_args)
yes, the plugin is just doing string matching, it does not actually understand python syntax. I wound not know how to build that in easily w/o a somewhat full parser of python.
Some parsing is unavoidable to solve the issue I guess, but parsing the imports would be enough.
I think this is resolved with 092a195220ff5bb9216ca5c9430256a4448ba708?