Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3602242

Browse filesBrowse files
committed
Move regex definition
1 parent 206b0c5 commit 3602242
Copy full SHA for 3602242

1 file changed

+3-4Lines changed: 3 additions & 4 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bpython/autocomplete.py‎

Copy file name to clipboardExpand all lines: bpython/autocomplete.py
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,10 @@ def format(self, filename):
223223
return filename
224224

225225

226-
attr_matches_re = LazyReCompile(r"(\w+(\.\w+)*)\.(\w*)")
227-
228-
229226
class AttrCompletion(BaseCompletionType):
230227

228+
attr_matches_re = LazyReCompile(r"(\w+(\.\w+)*)\.(\w*)")
229+
231230
def matches(self, cursor_offset, line, **kwargs):
232231
if 'locals_' not in kwargs:
233232
return None
@@ -272,7 +271,7 @@ def attr_matches(self, text, namespace):
272271
# Gna, Py 2.6's rlcompleter searches for __call__ inside the
273272
# instance instead of the type, so we monkeypatch to prevent
274273
# side-effects (__getattr__/__getattribute__)
275-
m = attr_matches_re.match(text)
274+
m = self.attr_matches_re.match(text)
276275
if not m:
277276
return []
278277

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.