ruff
c8edac9d - [pylint] Implement redefined-argument-from-local (R1704) (#8159)

Commit
1 year ago
[pylint] Implement redefined-argument-from-local (R1704) (#8159) ## Summary It implements Pylint rule R1704: redefined-argument-from-local Problematic code: ```python def show(host_id=10.11): # +1: [redefined-argument-from-local] for host_id, host in [[12.13, "Venus"], [14.15, "Mars"]]: print(host_id, host) ``` Correct code: ```python 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) ``` References: [Pylint documentation](https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/redefined-argument-from-local.html) [Related Issue](https://github.com/astral-sh/ruff/issues/970) ## Test Plan `cargo test`
Author
Parents
Loading