
    i
                        S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	  S SK
Jr  S SKJr  S SKJr  \(       a  S S	KJr  S S
KJr  \	R&                  4         SS jjr\	R*                  4       SS jjrg)    )annotations)PyCF_ONLY_AST)suppress)TYPE_CHECKING)LogLevel)BuiltinModuleError)safe_get_annotation)logger)Expr)	Docstringc                B    [         R                  4SS jjnU" XX#5        g)aZ  Log a warning when parsing a docstring.

This function logs a warning message by prefixing it with the filepath and line number.

Parameters:
    docstring: The docstring object.
    offset: The offset in the docstring lines.
    message: The message to log.

Returns:
    A function used to log parsing warnings if `name` was passed, else none.
c                @    U R                   R                  n[        [        UR                  5      nU" U SU R                  =(       d    SU-    SU 35        g ! [        [        4 a    Sn NU[         a'    SU R                   R
                  R                   S3n Nf = f)Nz<module>z	<module: >:r   z: )parentrelative_filepathAttributeError
ValueErrorr   modulenamegetattrr
   valuelineno)	docstringoffsetmessage	log_levelprefixlogs         [/home/james-whalen/.local/lib/python3.13/site-packages/griffe/_internal/docstrings/utils.pywarndocstring_warning.<locals>.warn&   s    	A%%77F
 fioo.vha)).Q&89G9EF 
+ 	 F! 	A !1!1!8!8!=!= >a@F	As   A B--BBN
r   r   r   intr   strr   r   returnNone)r   warning)r   r   r   r   r!   s        r    docstring_warningr)      s!    & U]TdTd G 	G/    c           	        [        [        [        5         [        U SS[        SS9nUR
                  (       a3  [        UR
                  UR                  US9nU=(       d    U sSSS5        $  SSS5        U $ ! , (       d  f       U $ = f)a  Parse a string into a true name or expression that can be resolved later.

Parameters:
    annotation: The annotation to parse.
    docstring: The docstring in which the annotation appears.
        The docstring's parent is accessed to bind a resolver to the resulting name/expression.
    log_level: Log level to use to log a message.

Returns:
    The string unchanged, or a new name or expression.
eval    )modefilenameflagsoptimize)r   r   N)r   r   SyntaxErrorcompiler   bodyr	   r   )
annotationr   r   codename_or_exprs        r    parse_docstring_annotationr9   3   s      

 z=[\]99.		 ''#L
  -:
 

 
 
 
 s   AA66
BNr#   )r6   r%   r   r   r   r   r&   z
str | Expr)
__future__r   astr   
contextlibr   typingr   griffe._internal.enumerationsr   griffe._internal.exceptionsr   griffe._internal.expressionsr	   griffe._internal.loggerr
   r   griffe._internal.modelsr   r(   r)   errorr9    r*   r    <module>rE      s    #     2 : < *11 #**	000 0 	0
 
0F #..  	r*   