Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7deaebe

Browse files
committedOct 24, 2017
Avoid using lower case l as a variable name.
This fixes new error in flake v3.5.0 from pccodestyle 2.1.0, $ flake8 Scripts/ Scripts/xbbtools/nextorf.py:102:9: E741 ambiguous variable name 'l' Scripts/xbbtools/xbb_widget.py:214:9: E741 ambiguous variable name 'l' Rational is to avoid the characters 'l', 'O', or 'I' as variable names because in some fonts they are indistinguishable from the numerals one and zero. Closes biopython#1422
1 parent a160241 commit 7deaebe

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed
 

‎Scripts/xbbtools/nextorf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ def Gc(self, seq):
9999
return round(gc * 100.0 / (d['A'] + d['T'] + gc), 1)
100100

101101
def Gc2(self, seq):
102-
l = len(seq)
102+
length = len(seq)
103103
d = {}
104104
for nt in ['A', 'T', 'G', 'C']:
105105
d[nt] = [0, 0, 0]
106106

107-
for i in range(0, l, 3):
107+
for i in range(0, length, 3):
108108
codon = seq[i:i + 3]
109109
if len(codon) < 3:
110110
codon += ' '

‎Scripts/xbbtools/xbb_widget.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,15 @@ def create_buttons(self, parent):
210210
b_id.pack(side='top', pady=5, padx=10)
211211
self.buttons[text] = b_id
212212

213-
f = ttk.Frame(self.button_frame)
214-
l = ttk.Label(f, text='Goto:')
215-
l.pack(side='left')
216-
l.bind('<Button-1>', self.goto)
213+
frame = ttk.Frame(self.button_frame)
214+
label = ttk.Label(frame, text='Goto:')
215+
label.pack(side='left')
216+
label.bind('<Button-1>', self.goto)
217217

218-
self.goto_entry = ttk.Entry(f, width=5)
218+
self.goto_entry = ttk.Entry(frame, width=5)
219219
self.goto_entry.pack(side='right', pady=5, padx=4)
220220
self.goto_entry.bind('<Return>', self.goto)
221-
f.pack(side='bottom')
221+
frame.pack(side='bottom')
222222

223223
def create_seqfield(self, parent):
224224
self.sequence_id = tk.Text(parent, wrap='char', width=self.seqwidth)

0 commit comments

Comments
 (0)
Please sign in to comment.