pylint-errors

E1111 (assignment-from-no-return)

:x: Problematic code:

def foo(x, y):
    z = x + y


value = foo(10, 10)
print(value)

:heavy_check_mark: Correct code:

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


value = foo(10, 10)
print(value)

Rationale:

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