diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-08-31 04:50:55 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-08-31 04:50:55 (GMT) |
commit | bfbaa6b206abdb8b1c3861926f4334b879ec91cc (patch) | |
tree | a06ead659eacb714127ad34289a543942d14e4e6 /Lib/idlelib/pathbrowser.py | |
parent | 89b1162511dd62e285c1911013f07b45af07f70a (diff) | |
download | cpython-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/pathbrowser.py')
-rw-r--r-- | Lib/idlelib/pathbrowser.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/idlelib/pathbrowser.py b/Lib/idlelib/pathbrowser.py index 966af4b..6c19508 100644 --- a/Lib/idlelib/pathbrowser.py +++ b/Lib/idlelib/pathbrowser.py @@ -1,10 +1,10 @@ +import importlib.machinery import os import sys -import importlib.machinery -from idlelib.tree import TreeItem from idlelib.browser import ClassBrowser, ModuleBrowserTreeItem from idlelib.pyshell import PyShellFileList +from idlelib.tree import TreeItem class PathBrowser(ClassBrowser): @@ -24,6 +24,7 @@ class PathBrowser(ClassBrowser): def rootnode(self): return PathBrowserTreeItem() + class PathBrowserTreeItem(TreeItem): def GetText(self): @@ -36,6 +37,7 @@ class PathBrowserTreeItem(TreeItem): sublist.append(item) return sublist + class DirBrowserTreeItem(TreeItem): def __init__(self, dir, packages=[]): @@ -95,6 +97,7 @@ class DirBrowserTreeItem(TreeItem): sorted.sort() return sorted + def _path_browser(parent): # htest # flist = PyShellFileList(parent) PathBrowser(flist, _htest=True) |