pydoc.vim icon indicating copy to clipboard operation
pydoc.vim copied to clipboard

"bar" documentation not found if imported as "from foo import bar"

Open fvisin opened this issue 10 years ago • 3 comments

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)

fvisin avatar Apr 20 '15 03:04 fvisin

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.

fs111 avatar Apr 20 '15 09:04 fs111

Some parsing is unavoidable to solve the issue I guess, but parsing the imports would be enough.

fvisin avatar Apr 21 '15 20:04 fvisin

I think this is resolved with 092a195220ff5bb9216ca5c9430256a4448ba708?

idbrii avatar Nov 10 '20 23:11 idbrii