<type>wingtip</type>
<domain>editor</domain>
<id>type-hints</id>
<title>Help Wing Understand Your Code</title>
<date>$Date$</date>
<version>$Revision$</version>
<product>per+</product>

~~PRODUCT_NAME~~ uses a multi-layered strategy for type analysis to provide the most
complete and correct information possible in the `auto-completer
<ref:edit/auto-completion>`__, `goto-definition <ref:edit/navigating-source>`__, `Source
Assistant <ref:edit/source-assistant>`__, `Source Browser <ref:browser/index>`__,
~~~if WINGPRO:
`Find Uses <ref:edit/points-of-use>`__, `Refactoring <ref:refactoring/index>`__, 
~~~
and other tools.

To help Wing do its job:

1) Check whether you have properly set your ``Python Executable``, and ``Python Path`` in
   `Project Properties <script:view_project_properties>`__, so Wing can find the modules
   that your code imports. You can see the effective ``PYTHONPATH`` with `Show Python
   Environment <script:show-python-environment>`__ in the ``Source`` menu.

2) In code that is difficult to statically analyze, set a breakpoint and run the debugger
   to that point. Wing will use the live runtime state of the debug process to supplement
   type information it finds with static analysis.  Working in the `Python Shell
   <ref:debug/python-shell>`__ also does this.

3) Add ``PEP484`` and ``PEP 526`` type hints where needed, or provide interface definition
   files with type information to Wing. 
   
See `Helping Wing Analyze Code <ref:edit/helping-wing-analyze-code>`__ for details.

