PY3.R1704
Redefined argument from local
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.
Noncompliant Code:
Copy
def show(host_id=10.11):
for host_id, host in [[12.13, 'Venus'], [14.15, 'Mars']]:
print(host_id, host)
Compliant Code:
Copy
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)