X Tutup
Skip to content

Commit b89705d

Browse files
committed
Fix some pyflakes warnings
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent 7be3c6b commit b89705d

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

bpython/curtsies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def process_event(e):
142142
process_event(paste)
143143

144144
process_event(None) # do a display before waiting for first event
145-
for _ in find_iterator:
145+
for unused in find_iterator:
146146
e = input_generator.send(0)
147147
if e is not None:
148148
process_event(e)

bpython/curtsiesfrontend/parse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def parse(s):
3333
while True:
3434
if not rest:
3535
break
36-
d, rest = peel_off_string(rest)
37-
stuff.append(d)
36+
start, rest = peel_off_string(rest)
37+
stuff.append(start)
3838
return (sum([fs_from_match(d) for d in stuff[1:]], fs_from_match(stuff[0]))
3939
if len(stuff) > 0
4040
else FmtStr())

bpython/curtsiesfrontend/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def only_whitespace_left_of_cursor():
634634
front_white = (len(self.current_line[:self.cursor_offset]) -
635635
len(self.current_line[:self.cursor_offset].lstrip()))
636636
to_add = 4 - (front_white % self.config.tab_length)
637-
for _ in range(to_add):
637+
for unused in range(to_add):
638638
self.add_normal_character(' ')
639639
return
640640

bpython/history.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def reset(self):
189189

190190
def load(self, filename, encoding):
191191
with codecs.open(filename, 'r', encoding, 'ignore') as hfile:
192-
with FileLock(hfile) as lock:
192+
with FileLock(hfile):
193193
self.entries = self.load_from(hfile)
194194

195195

@@ -202,7 +202,7 @@ def load_from(self, fd):
202202

203203
def save(self, filename, encoding, lines=0):
204204
with codecs.open(filename, 'w', encoding, 'ignore') as hfile:
205-
with FileLock(hfile) as lock:
205+
with FileLock(hfile):
206206
self.save_to(hfile, self.entries, lines)
207207

208208

@@ -220,7 +220,7 @@ def append_reload_and_write(self, s, filename, encoding):
220220

221221
try:
222222
with codecs.open(filename, 'a+', encoding, 'ignore') as hfile:
223-
with FileLock(hfile) as lock:
223+
with FileLock(hfile):
224224
# read entries
225225
hfile.seek(0, os.SEEK_SET)
226226
entries = self.load_from(hfile)

bpython/urwid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ def reevaluate(self):
893893
self.scr.refresh()
894894

895895
if self.buffer:
896-
for _ in xrange(indent):
896+
for unused in xrange(indent):
897897
self.tab()
898898

899899
self.evaluating = False

0 commit comments

Comments
 (0)
X Tutup