
    Cj                         S SK JrJrJr   S SK Jr  \(       a  SSKJr  / SQr	 " S S\5      r
 " S S	\5      rS
SS\S\4S jrg! \ a	    S SKJr   NAf = f)    )Any
NamedTupleTYPE_CHECKING)	TypedDict   )Source)get_locationSourceLocationFormattedSourceLocationc                   .    \ rS rSr% Sr\\S'   \\S'   Srg)r      zFormatted source locationlinecolumn N)__name__
__module____qualname____firstlineno____doc__int__annotations____static_attributes__r       k/home/rurouni/.local/share/pipx/venvs/strix-agent/lib/python3.13/site-packages/graphql/language/location.pyr   r      s    #
IKr   r   c                   j    \ rS rSr% Sr\\S'   \\S'   \S\4S j5       r	S\
S\4S jrS\
S\4S	 jrS
rg)r
      z"Represents a location in a Source.r   r   returnc                 >    [        U R                  U R                  S9$ )N)r   r   )dictr   r   )selfs    r   	formattedSourceLocation.formatted   s    4;;77r   otherc                 f    [        U[        5      (       a  U R                  U:H  $ [        U 5      U:H  $ N)
isinstancer   r!   tupler    r#   s     r   __eq__SourceLocation.__eq__   s-    eT"">>U**T{e##r   c                     X:X  + $ r%   r   r(   s     r   __ne__SourceLocation.__ne__$   s      r   r   N)r   r   r   r   r   r   r   propertyr   r!   r   boolr)   r,   r   r   r   r   r
   r
      sO    ,
IK82 8 8$C $D $
!C !D !r   r
   sourcer   positionr   c                 $    U R                  U5      $ )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	   )r0   r1   s     r   r	   r	   (   s     x((r   N)typingr   r   r   r   ImportErrortyping_extensionsr0   r   __all__r   r
   r   r	   r   r   r   <module>r7      sg    1 1,  
Gi !Z !&) )S )^ )G  ,+,s   A AA