Back to Intellij Community

PyNoneFunctionAssignmentInspection

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

2025.3-rc-2356 B
Original Source

Reports cases when the result of a function that does not return anything is used.

This inspection is similar to pylint inspection E1111.

Example:

def just_print():
    print("Hello!")

action = just_print()
b = f"{just_print()}"

As a quick-fix, the IDE offers to remove the assignment.