Skip to content
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

docstring and fonctions signatures not always showing #712

Closed
nsklaus opened this issue Oct 9, 2017 · 3 comments
Closed

docstring and fonctions signatures not always showing #712

nsklaus opened this issue Oct 9, 2017 · 3 comments

Comments

@nsklaus
Copy link

nsklaus commented Oct 9, 2017

Expected Behaviour

pygame docstring and methods signature should always get displayed.

Actual Behaviour

pygame docstring and method signature aren't always displayed.

Steps to Reproduce

for example, in a new file type the following:

import pygame
pygame.draw.rect()

i don't get no docstring and no method signature.

..but if i do this:
pygame.Rect()
i do get them.

please see screenshots below.

anaconda-st3_1
anaconda-st3_2
anaconda-st3_3
anaconda-st3_4

bpython

note that bpython can display docstring and method signature fine in all cases, but anaconda-st3 cannot seem to be able to do so.
by the way, pygame project builds and runs fine from st3.
maybe i missed some important configuration steps ?
i don't understand why it doesn't work correctly or how should i make it works so.
(if that's possible at all ?)

ST3, Anaconda and OS versions

os: linux (Ubuntu 17.04)
st3: 3.0 build 3143
anaconda: 2.1.23

ST3 Console Logs

Anaconda's JsonServer Logs

Note: Anaconda's JsonServer logs can be found in:

  • Linux: ~/.local/share/anaconda/logs
    anaconda_jsonserver.log

  • OS X: ~/Library/Logs/anaconda

  • Windows: %APPDATA\Anaconda\Logs

@DamnWidget
Copy link
Owner

Compare Anaconda and BPython is like compare apples and oranges, for a start, anaconda relies on Jedi Python Autocompletion library while BPython implements it's own code analyzer, anaconda is based in an asynchronous client - server architecture (with it's delays, timeouts, latency and problems) while BPython is a monolithic piece of software.

Basically, Anaconda can complete or analyze anything that Jedi can (with your configured anaconda python interpreter) and it doesn't have to match with what BPython or IPythoin or PyCharm can analyze or complete.

@nsklaus
Copy link
Author

nsklaus commented Oct 9, 2017

ok then. sorry for the comparison.
so how do i make anaconda to show docstrings and methods signatures in cases highlighted earlier ? is that an anaconda or jedi problem ?

@nsklaus
Copy link
Author

nsklaus commented Oct 14, 2017

i've found a workaround as suggested here:
davidhalter/jedi#769

it turns out jedi doesn't seem to support imports made in a try/except block.
until jedi figure this out, the workaround suggested to manually edit pygame's init.py do work. now i do get my popups :)

it's dirty but well, it works. file to edit is here:
/usr/local/lib/python3.6/dist-packages/pygame/__init__.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants