PyCharm 2024.3 Help

Resolve references

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

Apply a quick-fix

  1. Place the caret at an unresolved reference, PyCharm shows the red light bulb.

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

    Available fixes for an unresolved reference

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.

    Create a parameter

    See also Extract parameter and Change signature.

  • Ignore unresolved reference <fully qualified symbol name>. The fully qualified name of the symbol will be added to the list of ignored references (File | Settings | Editor | Inspections - Python - Unresolved references).

    Ignore unresolved references for Foo.f
  • Mark all attributes of <fully qualified type name> as ignored. In this case, the list of ignored references (File | Settings | Editor | Inspections - Python - Unresolved references) will be modified with the fully qualified name of the type with the wildcard (*) at the end.

    Ignore unresolved references for Foo.*
Last modified: 26 May 2024