Removed some unneeded imports, moved others around.
This commit is contained in:
parent
a8832b45e7
commit
12f86ade21
|
@ -41,12 +41,8 @@ used, and this module (and the readline module) are silently inactive.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import readline
|
import readline
|
||||||
import keyword
|
|
||||||
import __builtin__
|
import __builtin__
|
||||||
import __main__
|
import __main__
|
||||||
import string
|
|
||||||
import re
|
|
||||||
import traceback
|
|
||||||
|
|
||||||
class Completer:
|
class Completer:
|
||||||
|
|
||||||
|
@ -71,6 +67,7 @@ class Completer:
|
||||||
currently defines in __main__ that match.
|
currently defines in __main__ that match.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
import keyword
|
||||||
matches = []
|
matches = []
|
||||||
n = len(text)
|
n = len(text)
|
||||||
for list in [keyword.kwlist,
|
for list in [keyword.kwlist,
|
||||||
|
@ -93,6 +90,7 @@ class Completer:
|
||||||
with a __getattr__ hook is evaluated.
|
with a __getattr__ hook is evaluated.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
import re
|
||||||
m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text)
|
m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text)
|
||||||
if not m:
|
if not m:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue