python (3.11.7)
    e!                     V   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    r; eej                  dk    rddlmZ  eddd           ddlmZ  ee           dS dS )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                            |           \  }}t           j                            |          }|t          v o|t
          vS N)ospathsplitextnormcaser   browseable_extension_blocklist)r
   _exts      C/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/idlelib/browser.pyis_browseable_extensionr      sF    
W
d
#
#FAs
'
3
C-MC/M$MM    c                    g }|                                  D ]\  }}||j        |k    rt          |d          r|j        r|j        |k    rg }|j        D ]R}t          |t                    r|}n#|j        }|j        |j        k    r|j         d| }|                    |           S|xj        d                    d	                    |                    z
  c_        |                    |           |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.
    Nsuper.z({})z, )
itemsmodulehasattrr   name
isinstancestrappendformatjoin)
child_dictmodnameobskeyobjsuperssupsnames           r   transform_childrenr*   #   s
    
C$$&&