autocomplete doesn't work


127
views
1
11 weeks ago by
Hi expert,

   I try below codes, and autocomplete doesn't work.

import matplotlib.pyplot as plt
fig = plt.figure()
fig.add_subplot(2,2,1)

  here in the last line, when I type fig.add , wing ide doesn't show the hint for autocompletion (expect it give hint to show add_subplot).

could you please help to comment?

by the way, I use Anaconda 4.4.0 64bits windows. (the project setting is 
Python Executable : D:\Software\Anaconda2\python
Python Path: D:\Software\Anaconda2
)



Thanks
modified 11 weeks ago by Wingware Support   • written 11 weeks ago by Louis Liu  

1 Answer


3
11 weeks ago by
In this case Wing's static analyzer is unable to determine the return type of plt.figure() and can't offer autocomplete suggestions.  An option in cases like this is to run to a breakpoint and then add code.  When a debug process is a active, Wing will inspect the runtime state of the debug process and use this information to determine the type of fig.

More information on helping Wing analyze code is in the manual at https://wingware.com/doc/edit/helping-wing-analyze-code
written 11 weeks ago by Wingware Support  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »