assignment-from-no-return / E1111ΒΆ

Message emitted:

Assigning result of a function call, where the function has no return


Used when an assignment is done on a function call but the inferred function doesn't return anything.

Problematic code:

def add(x, y):
    print(x + y)

value = add(10, 10)  # [assignment-from-no-return]

Correct code:

def add(x, y):
    return x + y

value = add(10, 10)

Created by the typecheck checker.