summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/autocomplete.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-08-31 04:50:55 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2016-08-31 04:50:55 (GMT)
commitbfbaa6b206abdb8b1c3861926f4334b879ec91cc (patch)
treea06ead659eacb714127ad34289a543942d14e4e6 /Lib/idlelib/autocomplete.py
parent89b1162511dd62e285c1911013f07b45af07f70a (diff)
downloadcpython-bfbaa6b206abdb8b1c3861926f4334b879ec91cc.zip
cpython-bfbaa6b206abdb8b1c3861926f4334b879ec91cc.tar.gz
cpython-bfbaa6b206abdb8b1c3861926f4334b879ec91cc.tar.bz2
Issue #27891: Consistently group and sort imports within idlelib modules.
Diffstat (limited to 'Lib/idlelib/autocomplete.py')
-rw-r--r--Lib/idlelib/autocomplete.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/Lib/idlelib/autocomplete.py b/Lib/idlelib/autocomplete.py
index 1200008..1e44fa5 100644
--- a/Lib/idlelib/autocomplete.py
+++ b/Lib/idlelib/autocomplete.py
@@ -4,26 +4,27 @@ This extension can complete either attribute names or file names. It can pop
a window with all available names, for the user to select from.
"""
import os
-import sys
import string
+import sys
-from idlelib.config import idleConf
-
-# This string includes all chars that may be in an identifier
-ID_CHARS = string.ascii_letters + string.digits + "_"
-
-# These constants represent the two different types of completions
+# These constants represent the two different types of completions.
+# They must be defined here so autocomple_w can import them.
COMPLETE_ATTRIBUTES, COMPLETE_FILES = range(1, 2+1)
from idlelib import autocomplete_w
+from idlelib.config import idleConf
from idlelib.hyperparser import HyperParser
-
import __main__
+# This string includes all chars that may be in an identifier.
+# TODO Update this here and elsewhere.
+ID_CHARS = string.ascii_letters + string.digits + "_"
+
SEPS = os.sep
if os.altsep: # e.g. '/' on Windows...
SEPS += os.altsep
+
class AutoComplete:
menudefs = [