
    -Sh                     x    d Z ddlmZ ddlmZ ddlmZ ddlZddlZddlmZ ddlm	Z	  G d d	e
          Zd
 ZdS )z$Inline constants in a python module.    )absolute_import)division)print_functionN)	ast_utils)scopec                       e Zd ZdS )InlineErrorN)__name__
__module____qualname__     Z/var/www/html/movieo_spanner_bot/venv/lib/python3.11/site-packages/pasta/augment/inline.pyr	   r	      s        $r   r	   c                    t          j        |           }|j                 }t          |j        t
          j                  s&t          dt          |j                            |	                    |j                  }t          |t
          j
                  st          dz            |j        }t          |	                    |          t
          j                  st          dz            |j        D ]=}t          t          |dd          t
          j                  rt          dz            >|j        D ]=}t!          j        |	                    |          |t%          j        |                     >t)          |j                  dk    r*t!          j        |	                    |          |           dS fd|j        D             }||_        dS )	z%Inline a constant name into a module.z  is not a constant; it has type z#%r is not declared in an assignmentz%r is not a top-level namectxNz%r is not a constant   c                 ^    g | ])}t          |t          j                  r|j        k    '|*S r   )
isinstanceastNameid).0tgtnames     r   
<listcomp>zinline_name.<locals>.<listcomp>?   sC     G G G"311G69fnn 6Dnnr   )r   analyzenamesr   
definitionr   r   r	   typeparentAssignvalueModulereadsgetattrStorer   replace_childcopydeepcopylentargetsremove_child)tr   sc	name_nodeassign_noder"   reftgt_lists    `      r   inline_namer3       s   }Q"htn) 
I(#(	3	3 +
d9'(((* + + + 		).//+	K	,	, D
;dB
C
CC

%	BIIk**CJ	7	7 ;
2T9
:
:: _ 7 7c'#ud++SY77 7.56667 _ G GcBIIcNNCu1E1EFFFF 		""299[11;?????G G G G{2 G G GH"Kr   )__doc__
__future__r   r   r   r   r(   
pasta.baser   r   	Exceptionr	   r3   r   r   r   <module>r8      s    * * ' & & & & &       % % % % % % 



                       )   !# !# !# !# !#r   