o
    DDi                     @   s   d Z ddlmZ ddlmZmZmZmZ ddlm	Z	 eee
e
f df Ze	eddG dd dZe	eddG d	d
 d
ZdS )z
Data structures used for storing position information.

These are publicly exported by metadata, but their implementation lives outside of
metadata, because they're used internally by the codegen logic, which computes position
locations.
    )	dataclass)castoverloadTupleUnion)	add_slotsCodePositionT)frozenc                   @   s   e Zd ZU eed< eed< dS )r   linecolumnN)__name__
__module____qualname__int__annotations__ r   r   I/var/www/Datamplify/venv/lib/python3.10/site-packages/libcst/_position.pyr      s   
 c                   @   sx   e Zd ZU eed< eed< edededdfddZedeeef deeef ddfddZde	de	ddfddZdS )		CodeRangestartendreturnNc                 C      d S Nr   selfr   r   r   r   r   __init__*      zCodeRange.__init__c                 C   r   r   r   r   r   r   r   r   -   r   c                 C   s   t |tr(t |tr(t| dt|d |d  t| dt|d |d  d S tt|}tt|}t| d| t| d| d S )Nr   r      r   )
isinstancetupleobject__setattr__r   r   r   r   r   r   r   0   s    

)
r   r   r   r   r   r   r   r   r   _CodePositionTr   r   r   r   r       s   
 (r   N)__doc__dataclassesr   typingr   r   r   r   libcst._add_slotsr   r   r"   r   r   r   r   r   r   <module>   s   