pylint-errors

E1128 (assignment-from-none)

:x: Problematic code:

def foo():
    return None


f = foo()

:heavy_check_mark: Correct code:

def foo():
    return None


f = foo() if foo() else 1

Rationale:

Used when an assignment is done on a function call but the inferred function returns nothing but None.