pylint-errors

E0601 (used-before-assignment)

:x: Problematic code:

if input():
    user_input = input()


print(user_input)

:heavy_check_mark: Correct code:

user_input = None
if input():
    user_input = input()


print(user_input)

Rationale:

Used when a local variable is accessed before its assignment.