PyCharm 2017.2 Help

Resolving References

PyCharm's on-the-fly inspection immediately detects unresolved references, and highlights them with the red curvy line. PyCharm suggests quick fixes to deal with the unresolved references in the source code.

When you place the caret at an unresolved reference, PyCharm shows the red light bulb.

/help/img/idea/2017.2/py_unresolved1.png

Click the bulb, or press Alt+Enter to reveal the list of available quick fixes:

/help/img/idea/2017.2/py_unresolved2.png

PyCharm suggests a number of solutions. For example, choose one of the following options:

  • Import this name to add an import statement.
  • Create parameter to add a parameter with some initial value to the list of function parameters.
    /help/img/idea/2017.2/py_unresolved5.png

    See also Extract Parameter and Change Signature.

  • Ignore unresolved reference <fully qualified symbol name>. So doing, the fully qualified name of the symbol in question will be added to the list of ignored references (File | Settings/Preferences | Editor | Inspections - Python - Unresolved references).
    /help/img/idea/2017.2/py_unresolved3.png
  • Mark all attributes of <fully qualified type name> as ignored. In this case, the list of ignored references (File | Settings/Preferencdes | Editor | Inspections - Python - Unresolved references) will be modified with the fully qualified name of the type in question with the wildcard (*) at the end.
    /help/img/idea/2017.2/py_unresolved4.png
Last modified: 26 October 2017

See Also