
    Xj                         d dl mZmZmZ 	 d dl mZ erddlmZ g dZ	 G d de      Z
 G d d	e      Zd
ddedefdZy# e$ r	 d dlmZ Y :w xY w)    )Any
NamedTupleTYPE_CHECKING)	TypedDict   )Source)get_locationSourceLocationFormattedSourceLocationc                   &    e Zd ZU dZeed<   eed<   y)r   zFormatted source locationlinecolumnN)__name__
__module____qualname____doc__int__annotations__     f/var/www/html/myl_app/scheduler-service/venv/lib/python3.12/site-packages/graphql/language/location.pyr   r      s    #
IKr   r   c                   \    e Zd ZU dZeed<   eed<   edefd       Zde	de
fdZde	de
fdZy	)
r
   z"Represents a location in a Source.r   r   returnc                 D    t        | j                  | j                        S )N)r   r   )dictr   r   )selfs    r   	formattedzSourceLocation.formatted   s    4;;77r   otherc                 \    t        |t              r| j                  |k(  S t        |       |k(  S N)
isinstancer   r   tupler   r   s     r   __eq__zSourceLocation.__eq__   s*    eT">>U**T{e##r   c                     | |k(   S r    r   r#   s     r   __ne__zSourceLocation.__ne__$   s    5=  r   N)r   r   r   r   r   r   propertyr   r   r   boolr$   r&   r   r   r   r
   r
      sO    ,
IK82 8 8$C $D $
!C !D !r   r
   sourcer   positionr   c                 $    | j                  |      S )zGet the line and column for a character position in the source.

    Takes a Source and a UTF-8 character offset, and returns the corresponding line and
    column as a SourceLocation.
    )r	   )r)   r*   s     r   r	   r	   (   s     x((r   N)typingr   r   r   r   ImportErrortyping_extensionsr)   r   __all__r   r
   r   r	   r   r   r   <module>r0      sg    1 1,  
Gi !Z !&) )S )^ )G  ,+,s   ? AA