Skip to content

Commit 1424a22

Browse files
committed
PEP8
1 parent a7d729e commit 1424a22

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

bpython/autocomplete.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ def format(self, word):
127127

128128
def substitute(self, cursor_offset, line, match):
129129
"""Returns a cursor offset and line with match swapped in"""
130-
lpart = self.locate(cursor_offset, line)
131-
result = lpart.start + len(match), line[:lpart.start] + match + line[lpart.end:]
132-
return result
130+
lpart = self.locate(cursor_offset, line)
131+
offset = lpart.start + len(match)
132+
changed_line = line[:lpart.start] + match + line[lpart.end:]
133+
return offset, changed_line
133134

134135
@property
135136
def shown_before_tab(self):
@@ -401,7 +402,8 @@ def matches(self, cursor_offset, line, **kwargs):
401402
# if identifier isn't ascii, don't complete (syntax error)
402403
if word is None:
403404
continue
404-
if self.method_match(word, n, r.word) and word != "__builtins__":
405+
if (self.method_match(word, n, r.word) and
406+
word != "__builtins__"):
405407
matches.add(_callable_postfix(val, word))
406408
return matches
407409

0 commit comments

Comments
 (0)