redefined-argument-from-local / R1704#
Redefining argument with the local name %r
Used when a local name is redefining an argument, which might suggest a potential error. This is taken in account only for a handful of name binding operations, such as for iteration, with statement assignment and exception handler assignment.
def show(host_id=10.11): for host_id, host in [[12.13, 'Venus'], [14.15, 'Mars']]: # [redefined-argument-from-local] print(host_id, host)
def show(host_id=10.11): for inner_host_id, host in [[12.13, 'Venus'], [14.15, 'Mars']]: print(host_id, inner_host_id, host)
Created by the refactoring checker.