
    c                     n    d dl Zd dlmZ d dlmZ d Zd Z e                                ee           dS )    N)AstroidManager)FormattedValuec                      j         } j        } j        }| j        |d} fd|D             }|r!|                     fd|D                         |di |}t           d          rf|rd|                                D ]B\  }	}
|
r;t          |
t          j	        j
                  st          |
|j        |          }|||	<   C |j        di | |S )Nlineno
col_offsetparentc                 2    i | ]}|t          |          S  getattr.0paramnodes     <lib/python3.11/site-packages/astroid/brain/brain_fstrings.py
<dictcomp>z+_clone_node_with_lineno.<locals>.<dictcomp>   s%    PPPuugdE22PPP    c                 2    i | ]}|t          |          S r   r   r   s     r   r   z+_clone_node_with_lineno.<locals>.<dictcomp>   s%    RRREE74#7#7RRRr   postinitr   r   r	   r   )	__class___other_fields_astroid_fieldsr   updatehasattritems
isinstancecollectionsabcSequence_clone_node_with_linenor   r   )r   r	   r   clsother_fieldsr   init_paramspostinit_paramsnew_noder   childcloned_childs   `           r   r"   r"      s)   
.C%L*O#4?fUUKPPPPPPPO TRRRR\RRRSSSs!![!!HtZ   -_ -+1133 	6 	6LE5 6Z{/GHH 66xx      *6&,,O,,,Or   c                    | j         r| j         j        dk    rr| j        | j         j        k    r_t          | j        | j        | j                  }t          | j         | j        |          }|                    || j                   |S d S d S d S )N   r   r   )valueformat_spec)r,   r   r   r   r	   r"   r   r-   )r   r'   	new_values      r   _transform_formatted_valuer/      s    z 	dj'1, 	;$*++ 	%{tt{  H 0ZH  I I4;KLLLO	 	 	 		 	r   )	collections.abcr   astroid.managerr   astroid.nodes.node_classesr   r"   r/   register_transformr   r   r   <module>r4      s|   
     * * * * * * 5 5 5 5 5 5  (
 
 
"    # #N4N O O O O Or   