'Redefining name %r from outer scope (line %s)'
Used when a variable’s name hides a name defined in the outer scope.
Here we define the variable
some_name that shadows the function of the same
def some_name(): pass def example(): some_name = 1
4:4: W0621: Redefining name 'some_name' from outer scope (line 1)
This can lead to very confusing type errors. Most of the time it is also a sign of naming problems.