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

Torben Hohn torben.hohn at linutronix.de
Fri Jan 5 14:34:48 CET 2018


On Fri, Jan 05, 2018 at 12:36:09PM +0100, Manuel Traut wrote:
> 
> 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.

"line" is already a long loop index.
letme post a fix then ...



> 
> > 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.

-- 
Mit freundlichen Grüßen
Torben Hohn

Linutronix GmbH

Standort: Bremen

Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Firmensitz / Registered Office: D-88690 Uhldingen, Bahnhofstr. 3
Registergericht / Local District Court: Amtsgericht Freiburg i. Br.; HRB
Nr. / Trade register no.: 700 806

Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner

Eine Bitte von uns: Sollten Sie diese E-Mail irrtümlich erhalten haben,
benachrichtigen Sie uns in diesem Falle bitte sobald wie es Ihnen
möglich ist, durch Antwort-Mail. Vielen Dank!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20180105/405c6de9/attachment.sig>


More information about the elbe-devel mailing list