python (3.12.0)
̑e! 4 d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z m
Z
mZ ddlm
Z
ddlmZ dadZd Zdd
Z G d d Z G d
de
Z G d de
Zd Zedk( r5 eej4 dk( rddlmZ eddd ddlmZ ee yy)zModule browser.
XXX TO DO:
- reparse when source changed (maybe just a button would be OK?)
(or recheck on window popup)
- add popup menu with more options (e.g. doc strings, base classes, imports)
- add base classes to class browser tree
N)idleConf)pyshell)TreeNodeTreeItemScrolledCanvas)
py_extensions)ListedToplevel)z.pyic t j j | \ }}t j j | }|t v xr |t
vS N)ospathsplitextnormcaser browseable_extension_blocklist)r
_exts C/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/idlelib/browser.pyis_browseable_extensionr sD
WW
d
#FAs
''
3
C-MC/M$MM c g }| j D ] \ }}||j |k( st |d r|j r|j |k( rg }|j D ]\ }t |t r|}n6|j }|j |j k7 r|j d| }|j | ^ |xj dj dj | z
c_ |j | |S )a Transform a child dictionary to an ordered sequence of objects.
The dictionary maps names to pyclbr information objects.
Filter out imported objects.
Augment class names with bases.
The insertion order of the dictionary is assumed to have been in line
number order, so sorting is not necessary.
The current tree only calls this once per child_dict as it saves
TreeItems once created. A future tree and tests might violate this,
so a check prevents multiple in-place augmentations.
super.z({})z, )
itemsmodulehasattrr name
isinstancestrappendformatjoin)
child_dictmodnameobskeyobjsuperssupsnames r transform_childrenr* # s
C$$&