Back to Intellij Community

PyUnreachableCodeInspection

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

2025.3-rc-2230 B
Original Source

Reports code fragments that cannot be normally reached.

Example:

if True:
    print('Yes')
else:
    print('No')

As a fix, you might want to check and modify the algorithm to ensure it implements the expected logic.