[elbe-devel] [PATCH 6/7] pep8: fix E741 ambiguous variable name 'l'

Manuel Traut manuel.traut at linutronix.de
Fri Jan 5 12:36:09 CET 2018


On Fri, Jan 05, 2018 at 11:39:55AM +0100, Torben Hohn wrote:
> On Thu, Dec 21, 2017 at 11:57:34AM +0100, Manuel Traut wrote:
> > Hi,
> > 
> > i just noticed that this change triggers an error:
> > 
> >   Traceback (most recent call last):
> >     File "/var/cache/elbe/devel/elbepack/asyncworker.py", line 102, in execute
> >       skip_pbuild=self.skip_pbuilder)
> >     File "/var/cache/elbe/devel/elbepack/elbeproject.py", line 240, in build
> >       self.xml.validate_apt_sources(m, self.arch)
> >     File "/var/cache/elbe/devel/elbepack/elbexml.py", line 184, in validate_apt_sources
> >       srcline = re.sub(r'\[.*\] ', '', l)
> >   NameError: global name 'l' is not defined
> > 
> > It will be fixed in v2.
> 
> Dont name the iterator variable source_line, thats too long.
> from: http://pycodestyle.pycqa.org/en/latest/intro.html
> 
> E741 	do not use variables named ‘l’, ‘O’, or ‘I’
> 
> i actually unhappy with not naming the variable l.
> 
> I propose i or ll or line, if you want it long.

it is converted into srcline in patch [7/7] of this series,
because source_line introduced a new line too long warning.

Hope you're also fine with that.

> But i would also be happy, if we ignored E741. Because
> a font unable to distinguish I and l is not funny :)

hehe, me too - but hey. If it is that easy to be compliant, let's be compliant.



More information about the elbe-devel mailing list