PyCQA / pycodestyle

Simple Python style checker in one Python file
https://pycodestyle.pycqa.org
Other
5.03k stars 753 forks source link

(unreleased) ambiguous identifier triggers multiple times #1121

Closed asottile closed 1 year ago

asottile commented 1 year ago

this line of code triggers three warnings but should only trigger one:

lambda l: dict(zip(l, range(len(l))))
$ python3 -m pycodestyle t.py
t.py:1:8: E741 ambiguous variable name 'l'
t.py:1:20: E741 ambiguous variable name 'l'
t.py:1:33: E741 ambiguous variable name 'l'

cc @dannysepler

dannysepler commented 1 year ago

good catches! i might be able to help tonight or tomorrow night (EST), if you haven't resolved all the regressions by then

asottile commented 1 year ago

via #1123