unused-variable / W0612#

Message emitted:

Unused variable %r

Description:

Used when a variable is defined but not used.

Correct code:

def print_fruits():
    fruit1 = "orange"
    fruit2 = "apple"
    print(fruit1, fruit2)

Problematic code:

def print_fruits():
    fruit1 = "orange"
    fruit2 = "apple"  # [unused-variable]
    print(fruit1)

Created by the variables checker.