Search code examples
eclipsepydev

PyDev and Eclipse - Is there any way to show the functions documentation when hovering it?


PyDev - hover function I want to check the functions documentation when hovering it, similar to what happens when I'm coding in Java, in Eclipse IDE. Is it possible?


Solution

  • It usually does show it... the problem is that in this particular case the type inference engine is not finding the docstring -- i.e.: it seems random.randint just as an assign to Random._randint and is not following it.

    In this particular case you can ask to get completions for random by introspecting it with a shell instead of using the static analysis type inference.

    You can do that by adding random to the Forced Builtins as explained in: https://www.pydev.org/manual_101_interpreter.html#PyDevInterpreterConfiguration-ForcedBuiltins

    i.e.: by doing that it shows the following for me (note that when it can, the hover shows not only the docstring but also the source code, which provides the signature as well as the docstring):

    enter image description here