
    i=                    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
Jr  S SKJr   " S S	5      r " S
 S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S  S!\5      r " S" S#\5      r " S$ S%\5      r " S& S'\5      r " S( S)5      r " S* S+\5      r " S, S-\5      r " S. S/\5      r  " S0 S1\5      r! " S2 S3\5      r" " S4 S5\5      r# " S6 S7\5      r$ " S8 S9\5      r% " S: S;\5      r& " S< S=\5      r' " S> S?\5      r( " S@ SA\5      r) " SB SC\5      r* " SD SE\5      r+ " SF SG\5      r, " SH SI\5      r- " SJ SK\5      r.gL)M    )annotations)TYPE_CHECKING)DocstringSectionKind)	ExprTuple)Sequence)AnyLiteral)Exprc                  4    \ rS rSrSrSS.SS jjrS	S jrSrg)
DocstringElement   z8This base class represents annotated, nameless elements.N
annotationc                   Xl          X l        g)zInitialize the element.

Parameters:
    annotation: The element annotation, if any.
    description: The element description.
Ndescriptionr   )selfr   r   s      \/home/james-whalen/.local/lib/python3.13/site-packages/griffe/_internal/docstrings/models.py__init__DocstringElement.__init__   s     !,&-7%    c                4    U R                   U R                  S.$ )Return this element's data as a dictionary.

Parameters:
    **kwargs: Additional serialization options.

Returns:
    A dictionary.
r   r   r   )r   kwargss     r   as_dictDocstringElement.as_dict!   s     //++
 	
r   r   )r   strr   str | Expr | NonereturnNoner   r   r    zdict[str, Any])__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes__ r   r   r   r      s    BLP 
&
r   r   c                  \   ^  \ rS rSrSrSSS.         SU 4S jjjrS	U 4S jjrSrU =r$ )
DocstringNamedElement0   z5This base class represents annotated, named elements.Nr   valuec               :   > [         TU ]  X#S9  Xl         X@l        g)zInitialize the element.

Parameters:
    name: The element name.
    description: The element description.
    annotation: The element annotation, if any.
    value: The element value, as a string.
r   N)superr   namer.   )r   r1   r   r   r.   	__class__s        r   r   DocstringNamedElement.__init__3   s%      	[H	(-
'r   c                |   > SU R                   0[        TU ]  " S0 UD6EnU R                  b  U R                  US'   U$ )r   r1   r.   r)   )r1   r0   r   r.   )r   r   baser2   s      r   r   DocstringNamedElement.as_dictI   s@     		?UW_%>v%>?::! JJDMr   )r1   r.   )
r1   r   r   r   r   r   r.   r   r    r!   r"   )	r#   r$   r%   r&   r'   r   r   r(   __classcell__r2   s   @r   r+   r+   0   sR    ? )-#'(( 	(
 &( !( 
( (, r   r+   c                      \ rS rSrSr\S	S j5       r\R                  S
S j5       r\SS j5       r\R                  SS j5       rSr	g)DocstringAdmonitionX   z$This class represents an admonition.c                    U R                   $ )zThe kind of this admonition.r   r   s    r   kindDocstringAdmonition.kind[        r   c                    Xl         g Nr   r   r.   s     r   r>   r?   `       r   c                    U R                   $ )z The contents of this admonition.r   r=   s    r   contentsDocstringAdmonition.contentsd   s     r   c                    Xl         g rB   rF   rC   s     r   rG   rH   i   s     r   r   Nr    r   )r.   z
str | Exprr    r!   r    r   r.   r   r    r!   )
r#   r$   r%   r&   r'   propertyr>   setterrG   r(   r)   r   r   r:   r:   X   s[    .  
[[        __! !r   r:   c                  T    \ rS rSrSr\SS j5       r\R                  SS j5       rSrg)	DocstringDeprecatedn   z3This class represents a documented deprecated item.c                    U R                   $ )z The version of this deprecation.r   r=   s    r   versionDocstringDeprecated.versionq   r@   r   c                    Xl         g rB   r   rC   s     r   rS   rT   v   rD   r   r   NrK   rL   )	r#   r$   r%   r&   r'   rM   rS   rN   r(   r)   r   r   rP   rP   n   s/    =  ^^   r   rP   c                      \ rS rSrSrSrg)DocstringRaise{   z/This class represents a documented raise value.r)   Nr#   r$   r%   r&   r'   r(   r)   r   r   rW   rW   {       9r   rW   c                      \ rS rSrSrSrg)DocstringWarn   z.This class represents a documented warn value.r)   NrY   r)   r   r   r\   r\          8r   r\   c                      \ rS rSrSrSrg)DocstringReturn   z0This class represents a documented return value.r)   NrY   r)   r   r   r`   r`      s    :r   r`   c                      \ rS rSrSrSrg)DocstringYield   z/This class represents a documented yield value.r)   NrY   r)   r   r   rc   rc      rZ   r   rc   c                      \ rS rSrSrSrg)DocstringReceive   z1This class represents a documented receive value.r)   NrY   r)   r   r   rf   rf      s    ;r   rf   c                  T    \ rS rSrSr\SS j5       r\R                  SS j5       rSrg)	DocstringParameter   z5This class represent a documented function parameter.c                    U R                   $ )z$The default value of this parameter.r.   r=   s    r   defaultDocstringParameter.default        zzr   c                    Xl         g rB   rl   rC   s     r   rm   rn          
r   rl   NrJ   rL   )	r#   r$   r%   r&   r'   rM   rm   rN   r(   r)   r   r   ri   ri      s/    ?  ^^ r   ri   c                      \ rS rSrSr\SS j5       r\R                  SS j5       r\SS j5       r\R                  SS j5       r\SS j5       r	\	R                  SS j5       r	S	r
g
)DocstringTypeParameter   z1This class represent a documented type parameter.c                    U R                   $ )z)The default value of this type parameter.rl   r=   s    r   rm   DocstringTypeParameter.default   ro   r   c                    Xl         g rB   rl   rC   s     r   rm   rv      rq   r   c                Z    [        U R                  [        5      (       d  U R                  $ g)z!The bound of this type parameter.N)
isinstancer   r   r=   s    r   boundDocstringTypeParameter.bound   s"     $//955??"r   c                    Xl         g rB   r   )r   rz   s     r   rz   r{      rD   r   c                    [        U R                  [        5      (       a  [        U R                  R                  5      $ g)z'The constraints of this type parameter.N)ry   r   r   tupleelementsr=   s    r   constraints"DocstringTypeParameter.constraints   s-     dooy111122r   c                :    Ub  [        U5      U l        g S U l        g rB   )r   r   )r   r   s     r   r   r      s    "'4DO"DOr   r-   NrJ   rL   )rz   r   r    r!   )r    ztuple[str | Expr, ...] | None)r   zSequence[str | Expr] | Noner    r!   )r#   r$   r%   r&   r'   rM   rm   rN   rz   r   r(   r)   r   r   rs   rs      s    ;  ^^    \\      # #r   rs   c                      \ rS rSrSrSrg)DocstringAttribute   z:This class represents a documented module/class attribute.r)   NrY   r)   r   r   r   r      s    Dr   r   c                  ,    \ rS rSrSr\SS j5       rSrg)DocstringFunction   z,This class represents a documented function.c                    U R                   $ )zThe function signature.r   r=   s    r   	signatureDocstringFunction.signature   r@   r   r)   NrJ   r#   r$   r%   r&   r'   rM   r   r(   r)   r   r   r   r      s    6 r   r   c                  ,    \ rS rSrSr\SS j5       rSrg)DocstringClass   z)This class represents a documented class.c                    U R                   $ )zThe class signature.r   r=   s    r   r   DocstringClass.signature   r@   r   r)   NrJ   r   r)   r   r   r   r      s    3 r   r   c                      \ rS rSrSrSrg)DocstringTypeAlias   z.This class represents a documented type alias.r)   NrY   r)   r   r   r   r      r^   r   r   c                      \ rS rSrSrSrg)DocstringModule   z*This class represents a documented module.r)   NrY   r)   r   r   r   r      s    4r   r   c                  H    \ rS rSr% SrS\S'    S
SS jjrSS jrSS jrS	r	g)DocstringSection   z*This class represents a docstring section.r   r>   Nc                     Xl          SU l        g)zCInitialize the section.

Parameters:
    title: An optional title.
Ntitler.   )r   r   s     r   r   DocstringSection.__init__   s     "'
 
 r   c                ,    [        U R                  5      $ )z*Whether this section has a true-ish value.)boolr.   r=   s    r   __bool__DocstringSection.__bool__   s    DJJr   c                    [        U R                  S5      (       a  U R                  R                  " S0 UD6nOU R                  nU R                  R                  US.nU R                  (       a  U R                  US'   U$ )zReturn this section's data as a dictionary.

Parameters:
    **kwargs: Additional serialization options.

Returns:
    A dictionary.
r   )r>   r.   r   r)   )hasattrr.   r   r>   r   )r   r   serialized_valuer5   s       r   r   DocstringSection.as_dict   sc     4::y))#zz11;F;#zz		2BC:: JJDMr   r   rB   )r   
str | Noner    r!   )r    r   r"   )
r#   r$   r%   r&   r'   __annotations__r   r   r   r(   r)   r   r   r   r      s    4
	! r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionTexti	  z%This class represents a text section.r   r>   c                0   > [         TU ]  U5        Xl        g)z`Initialize the section.

Parameters:
    value: The section text.
    title: An optional title.
Nr0   r   r.   r   r.   r   r2   s      r   r   DocstringSectionText.__init__  s     	
r   rl   rB   )r.   r   r   r   r    r!   )r#   r$   r%   r&   r'   r   textr>   r   r   r(   r7   r8   s   @r   r   r   	  s!    /!5!:!:D
:   r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionParametersi  z+This class represents a parameters section.r   r>   c                0   > [         TU ]  U5        Xl        g)zfInitialize the section.

Parameters:
    value: The section parameters.
    title: An optional title.
Nr   r   s      r   r   #DocstringSectionParameters.__init__       	/4
r   rl   rB   )r.   zlist[DocstringParameter]r   r   r    r!   )r#   r$   r%   r&   r'   r   
parametersr>   r   r   r(   r7   r8   s   @r   r   r     s!    5!5!@!@D
@5 5r   r   c                  <    \ rS rSr% Sr\R                  rS\S'   Sr	g)DocstringSectionOtherParametersi)  z2This class represents an other parameters section.r   r>   r)   N)
r#   r$   r%   r&   r'   r   other_parametersr>   r   r(   r)   r   r   r   r   )  s    <!5!F!FD
Fr   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionTypeParametersi/  z0This class represents a type parameters section.r   r>   c                0   > [         TU ]  U5        Xl        g)zkInitialize the section.

Parameters:
    value: The section type parameters.
    title: An optional title.
Nr   r   s      r   r   'DocstringSectionTypeParameters.__init__4  s     	38
r   rl   rB   )r.   zlist[DocstringTypeParameter]r   r   r    r!   )r#   r$   r%   r&   r'   r   type_parametersr>   r   r   r(   r7   r8   s   @r   r   r   /  s!    :!5!E!ED
E9 9r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionRaisesi?  z'This class represents a raises section.r   r>   c                0   > [         TU ]  U5        Xl        g)zfInitialize the section.

Parameters:
    value: The section exceptions.
    title: An optional title.
Nr   r   s      r   r   DocstringSectionRaises.__init__D       	+0
r   rl   rB   )r.   zlist[DocstringRaise]r   r   r    r!   )r#   r$   r%   r&   r'   r   raisesr>   r   r   r(   r7   r8   s   @r   r   r   ?  !    1!5!<!<D
<1 1r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionWarnsiO  z&This class represents a warns section.r   r>   c                0   > [         TU ]  U5        Xl        g)zdInitialize the section.

Parameters:
    value: The section warnings.
    title: An optional title.
Nr   r   s      r   r   DocstringSectionWarns.__init__T  s     	*/
r   rl   rB   )r.   zlist[DocstringWarn]r   r   r    r!   )r#   r$   r%   r&   r'   r   warnsr>   r   r   r(   r7   r8   s   @r   r   r   O  s!    0!5!;!;D
;0 0r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionReturnsi_  z(This class represents a returns section.r   r>   c                0   > [         TU ]  U5        Xl        g)zjInitialize the section.

Parameters:
    value: The section returned items.
    title: An optional title.
Nr   r   s      r   r    DocstringSectionReturns.__init__d       	,1
r   rl   rB   )r.   zlist[DocstringReturn]r   r   r    r!   )r#   r$   r%   r&   r'   r   returnsr>   r   r   r(   r7   r8   s   @r   r   r   _  !    2!5!=!=D
=2 2r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionYieldsio  z'This class represents a yields section.r   r>   c                0   > [         TU ]  U5        Xl        g)ziInitialize the section.

Parameters:
    value: The section yielded items.
    title: An optional title.
Nr   r   s      r   r   DocstringSectionYields.__init__t  r   r   rl   rB   )r.   zlist[DocstringYield]r   r   r    r!   )r#   r$   r%   r&   r'   r   yieldsr>   r   r   r(   r7   r8   s   @r   r   r   o  r   r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionReceivesi  z)This class represents a receives section.r   r>   c                0   > [         TU ]  U5        Xl        g)zjInitialize the section.

Parameters:
    value: The section received items.
    title: An optional title.
Nr   r   s      r   r   !DocstringSectionReceives.__init__  s     	-2
r   rl   rB   )r.   zlist[DocstringReceive]r   r   r    r!   )r#   r$   r%   r&   r'   r   receivesr>   r   r   r(   r7   r8   s   @r   r   r     s!    3!5!>!>D
>3 3r   r   c                  d   ^  \ rS rSr% Sr\R                  rS\S'    S     SU 4S jjjr	Sr
U =r$ )	DocstringSectionExamplesi  z*This class represents an examples section.r   r>   c                0   > [         TU ]  U5        Xl        g)zdInitialize the section.

Parameters:
    value: The section examples.
    title: An optional title.
Nr   r   s      r   r   !DocstringSectionExamples.__init__  s     	jo
r   rl   rB   )r.   zSlist[tuple[Literal[DocstringSectionKind.text, DocstringSectionKind.examples], str]]r   r   r    r!   )r#   r$   r%   r&   r'   r   examplesr>   r   r   r(   r7   r8   s   @r   r   r     sG    4!5!>!>D
>
 !pbp p 
	p pr   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionAttributesi  z,This class represents an attributes section.r   r>   c                0   > [         TU ]  U5        Xl        g)zfInitialize the section.

Parameters:
    value: The section attributes.
    title: An optional title.
Nr   r   s      r   r   #DocstringSectionAttributes.__init__  r   r   rl   rB   )r.   zlist[DocstringAttribute]r   r   r    r!   )r#   r$   r%   r&   r'   r   
attributesr>   r   r   r(   r7   r8   s   @r   r   r     s!    6!5!@!@D
@5 5r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionFunctionsi  z2This class represents a functions/methods section.r   r>   c                0   > [         TU ]  U5        Xl        g)zeInitialize the section.

Parameters:
    value: The section functions.
    title: An optional title.
Nr   r   s      r   r   "DocstringSectionFunctions.__init__  s     	.3
r   rl   rB   )r.   zlist[DocstringFunction]r   r   r    r!   )r#   r$   r%   r&   r'   r   	functionsr>   r   r   r(   r7   r8   s   @r   r   r     s!    <!5!?!?D
?4 4r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionClassesi  z(This class represents a classes section.r   r>   c                0   > [         TU ]  U5        Xl        gzcInitialize the section.

Parameters:
    value: The section classes.
    title: An optional title.
Nr   r   s      r   r    DocstringSectionClasses.__init__  r   r   rl   rB   )r.   zlist[DocstringClass]r   r   r    r!   )r#   r$   r%   r&   r'   r   classesr>   r   r   r(   r7   r8   s   @r   r   r     s!    2!5!=!=D
=1 1r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionTypeAliasesi  z-This class represents a type aliases section.r   r>   c                0   > [         TU ]  U5        Xl        gr   r   r   s      r   r   $DocstringSectionTypeAliases.__init__  r   r   rl   rB   )r.   zlist[DocstringTypeAlias]r   r   r    r!   )r#   r$   r%   r&   r'   r   type_aliasesr>   r   r   r(   r7   r8   s   @r   r   r     s!    7!5!B!BD
B5 5r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionModulesi  z(This class represents a modules section.r   r>   c                0   > [         TU ]  U5        Xl        g)zcInitialize the section.

Parameters:
    value: The section modules.
    title: An optional title.
Nr   r   s      r   r    DocstringSectionModules.__init__  r   r   rl   rB   )r.   zlist[DocstringModule]r   r   r    r!   )r#   r$   r%   r&   r'   r   modulesr>   r   r   r(   r7   r8   s   @r   r   r     r   r   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionDeprecatedi  z+This class represents a deprecated section.r   r>   c                @   > [         TU ]  U5        [        XS9U l        g)zInitialize the section.

Parameters:
    version: The deprecation version.
    text: The deprecation text.
    title: An optional title.
r   N)r0   r   rP   r.   )r   rS   r   r   r2   s       r   r   #DocstringSectionDeprecated.__init__  s     	*=*c
r   rl   rB   )rS   r   r   r   r   r   r    r!   )r#   r$   r%   r&   r'   r   
deprecatedr>   r   r   r(   r7   r8   s   @r   r   r     s#    5!5!@!@D
@	d 	dr   r   c                  X   ^  \ rS rSr% Sr\R                  rS\S'   SSU 4S jjjr	Sr
U =r$ )	DocstringSectionAdmonitioni  z,This class represents an admonition section.r   r>   c                @   > [         TU ]  U5        [        XS9U l        g)zInitialize the section.

Parameters:
    kind: The admonition kind.
    text: The admonition text.
    title: An optional title.
r   N)r0   r   r:   r.   )r   r>   r   r   r2   s       r   r   #DocstringSectionAdmonition.__init__	  s     	*=*`
r   rl   rB   )r>   r   r   r   r   r   r    r!   )r#   r$   r%   r&   r'   r   
admonitionr>   r   r   r(   r7   r8   s   @r   r   r     s#    6!5!@!@D
@	a 	ar   r   N)/
__future__r   typingr   griffe._internal.enumerationsr   griffe._internal.expressionsr   collections.abcr   r   r	   r
   r   r+   r:   rP   rW   r\   r`   rc   rf   ri   rs   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r)   r   r   <module>r	     s   #   > 2(#1
 
<%, %P!* !,
 * 
 :% :9$ 9;+ ;:* :<, <
. 
##2 ##LE. E- * 9. 95+ 5
% %P +   5!1 5 G&@ G9%5 9 1- 1 0, 0 2. 2 1- 1 3/ 3 p/ p(5!1 5 4 0 4 1. 1 5"2 5 2. 2 d!1 d"a!1 ar   