flake8 >= 3.8.0 emits E741 ambiguous variable name 'l'

Bug #1878236 reported by Paride Legovini
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Committed
High
Lucas Albuquerque Medeiros de Moura

Bug Description

I couldn't find a relevant entry in the flake8 release notes [1], but flake8 3.7.9 does not emit the error, while 3.8.0 does. The fact that they were not being emitted was likely a flake8 bug, as the recommendation [2,3] causing the error is nothing new. The errors are:

./curtin/block/lvm.py:26:40: E741 ambiguous variable name 'l'
./curtin/block/__init__.py:1319:17: E741 ambiguous variable name 'l'
./curtin/block/bcache.py:322:31: E741 ambiguous variable name 'l'
./curtin/block/bcache.py:323:30: E741 ambiguous variable name 'l'
./tests/unittests/test_block_dasd.py:20:21: E741 ambiguous variable name 'l'
./tests/unittests/test_apt_source.py:961:26: E741 ambiguous variable name 'l'
./tests/vmtests/test_network.py:111:28: E741 ambiguous variable name 'l'
./tests/vmtests/test_fs_battery.py:168:27: E741 ambiguous variable name 'l'

I think renaming l to L would be enough, and won't require rewraps.

[1] https://flake8.pycqa.org/en/latest/release-notes/3.8.0.html
[2] https://www.python.org/dev/peps/pep-0008/#names-to-avoid
[3] https://www.flake8rules.com/rules/E741.html

Tags: bitesize
Ryan Harper (raharper)
Changed in curtin:
importance: Undecided → High
status: New → Confirmed
tags: added: bitesize
Changed in curtin:
assignee: nobody → Lucas Albuquerque Medeiros de Moura (lamoura)
Revision history for this message
Paride Legovini (paride) wrote :
Revision history for this message
Paride Legovini (paride) wrote :

I proposed another branch cherry-picking Ryan's commits (to get rid of the commits coming from the enable-kernel-crashdump branch) and pinning the flake8 version in the py3-flake8 environment.

Paride Legovini (paride)
Changed in curtin:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.