Module imported but unused (F401)
A module has been imported but is not used anywhere in the file. The module should either be used or the import should be removed.
Anti-pattern
In this example, it is likely that namedtuple
was going to be used instead of a regular tuple
. However, namedtuple
was never used. It should be removed.
from collections import namedtuple
my_tuple = ('Grant', 'McConnaughey', 25)
Best practice
my_tuple = ('Grant', 'McConnaughey', 25)