Back to Intellij Community

PyUnresolvedReferencesInspection

python/python-psi-impl/resources/inspectionDescriptions/PyUnresolvedReferencesInspection.html

2025.3-rc-2545 B
Original Source

Reports references in your code that cannot be resolved.

In a dynamically typed language, this is possible in a limited number of cases.

If a reference type is unknown, then its attributes are not highlighted as unresolved even if you know that they should be:

def print_string(s):
    print(s.abc())

In this code fragment s is always a string and abc should be highlighted as unresolved. However, s type is inferred as Any and no warning is reported.

The IDE provides quick-fix actions to add missing references on-the-fly.