
    `N`                     N    d Z ddlmZ ddlmZ d Z G d dej                  ZdS )zIdentify containers for lib2to3 trees.

This module identifies containers and the elements in them. Each element points
to the opening bracket and vice-versa.

  IdentifyContainers(): the main function exported by this module.
    )pytree_utils)pytree_visitorc                 L    t                      }|                    |            dS )zRun the identify containers visitor over the tree, modifying it in place.

  Arguments:
    tree: the top-level pytree node to annotate with subtypes.
  N)_IdentifyContainersVisit)treeidentify_containerss     ?lib/python3.11/site-packages/yapf/yapflib/identify_container.pyIdentifyContainersr      s*     ,--D!!!!!    c                       e Zd ZdZd Zd ZdS )r   zH_IdentifyContainers - see file-level docstring for detailed description.c                    |j         D ]}|                     |           t          |j                   dk    rd S t          j        |j         d                   dk    rd S t          j        |j         d                   dk    rI|j         d         j         D ]4}t          j        t          j        |          |j         d                    5d S t          j        t          j        |j         d                   |j         d                    d S )N   r   LPAR   arglistchildrenr   lenr   NodeNameSetOpeningBracketFirstLeafNodeselfnodechilds      r
   Visit_trailerz!_IdentifyContainers.Visit_trailer'   s!     
jj
4=QfT]1-..&88fT]1-..);;=#, A A%&&u--t}Q/?	A 	A 	A 	AA A $

$T]1%5
6
6a8HJ J J J Jr   c                 P   |j         D ]}|                     |           t          |j                   dk    rd S t          j        |j         d                   dk    rd S |j         d         j         D ]4}t          j        t          j        |          |j         d                    5d S )Nr   r   r   r   r   r   s      r
   
Visit_atomz_IdentifyContainers.Visit_atom8   s      
jj
4=QfT]1-..&88fq!* ? ?$

$U
+
+T]1-=? ? ? ?? ?r   N)__name__
__module____qualname____doc__r   r    r   r
   r   r   $   s;        PPJ J J"? ? ? ? ?r   r   N)r#   yapf.yapflibr   r   r   PyTreeVisitorr   r$   r   r
   <module>r'      s{     & % % % % % ' ' ' ' ' '" " "? ? ? ? ?.6 ? ? ? ? ?r   