10000 Fix complete on dot. · python-mode/python-mode@b7eb0ec · GitHub
[go: up one dir, main page]

Skip to content

Commit b7eb0ec

Browse files
committed
Fix complete on dot.
1 parent c3751c9 commit b7eb0ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymode/rope.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def completions():
6161
return env.stop(proposals)
6262

6363

64-
FROM_RE = re.compile(r'^from\s+[\.\w\d_]+$')
64+
FROM_RE = re.compile(r'^\s*from\s+[\.\w\d_]+$')
6565

6666

6767
@env.catch_exceptions
@@ -76,7 +76,7 @@ def complete(dot=False):
7676

7777
cline = env.current.line[:col]
7878
env.debug('dot completion', cline)
79-
if FROM_RE.match(cline) or cline.endswith('..'):
79+
if FROM_RE.match(cline) or cline.endswith('..') or cline.endswith('\.'):
8080
return env.stop("")
8181

8282
proposals = get_proporsals(source, offset, dot=dot)

0 commit comments

Comments
 (0)
0