ó
    Ð]jÃ  ã                  óŠ   • S SK Jr  S SKrS SKrS SKrS SKJr     S	           S
S jjrSS jrSS jr	SSS jjr
SS jrg)é    )ÚannotationsN)ÚAnyc                ó  • [        U [        5      (       a  U R                  5       n [        R                  " U5      (       d  [        U5      R                  nOUR                  nU(       a  [        U5      U-   nU S:X  d   U Gc^  [        R                  " U5      (       GdB  Ub  U SU 3nU b  [        USU5      $ U$ Sn[        R                  " U5      (       a  UR                  nOÄ[        U[        R                  5      (       a  UR                  nSnO–[        U[        R                  5      (       a  UR                  R                  nSnO^[        U5      R                  [        R                  [
        R                  4;   a  S[        [!        U5      5      -  nSnO[#        U5      nSnU(       a  [        U5      U-   nU(       a  UR%                  S5      n['        XX#US9$ U S;   d  U c  U c  U$ [        USU5      $ [)        S	U -  5      e)
aA  Return string that describes a value

Parameters
----------
article : str or None
    A definite or indefinite article. If the article is
    indefinite (i.e. "a" or "an") the appropriate one
    will be inferred. Thus, the arguments of ``describe``
    can themselves represent what the resulting string
    will actually look like. If None, then no article
    will be prepended to the result. For non-articled
    description, values that are instances are treated
    definitely, while classes are handled indefinitely.
value : any
    The value which will be named.
name : str or None (default: None)
    Only applies when ``article`` is "the" - this
    ``name`` is a definite reference to the value.
    By default one will be inferred from the value's
    type and repr methods.
verbose : bool (default: False)
    Whether the name should be concise or verbose. When
    possible, verbose names include the module, and/or
    class name where an object was defined.
capital : bool (default: False)
    Whether the first letter of the article should
    be capitalized or not. By default it is not.

Examples
--------
Indefinite description:

>>> describe("a", object())
'an object'
>>> describe("a", object)
'an object'
>>> describe("a", type(object))
'a type'

Definite description:

>>> describe("the", object())
"the object at '...'"
>>> describe("the", object)
'the object object'
>>> describe("the", type(object))
'the type type'

Definitely named description:

>>> describe("the", object(), "I made")
'the object I made'
>>> describe("the", object, "I will use")
'the object I will use'
ÚtheÚ TFzat '%s'z'')ÚnameÚverboseÚcapital)ÚaÚanzAThe 'article' argument should be 'the', 'a', 'an', or None not %r)Ú
isinstanceÚstrÚlowerÚinspectÚisclassÚtypeÚ__name__Ú_prefixÚadd_articleÚtypesÚFunctionTypeÚ
MethodTypeÚ__func__Ú__repr__ÚobjectÚhexÚidÚreprÚjoinÚdescribeÚ
ValueError)ÚarticleÚvaluer   r	   r
   ÚtypenameÚresultÚ	tick_wraps           ÚY/home/mande/repo/quber/.venv/lib/python3.13/site-packages/traitlets/utils/descriptions.pyr    r    	   s¼  € ô| �'œ3×ÑØ—-‘-“/ˆä�?Š?˜5×!Ñ!Ü˜“;×'Ñ'‰à—>‘>ˆÞÜ˜5“> HÑ,ˆà�%Ó˜GšO´G·O²OÀE×4JÒ4JØÑØ �z  4 &Ð)ˆFØÑ"Ü" 6¨4°Ó9Ð9à�àˆIÜ�Š˜u×%Ñ%Ø—~‘~‘Ü˜E¤5×#5Ñ#5×6Ñ6Ø—~‘~�Ø ‘	Ü˜E¤5×#3Ñ#3×4Ñ4Ø—~‘~×.Ñ.�Ø ‘	Ü�e“×%Ñ%Ü—‘Ü—‘ð*ó ð !¤3¤r¨%£y£>Ñ1�Ø‘ä˜E“{�Ø�ÞÜ˜u“~¨Ñ,�ÞØ—y‘y “�Ü˜G°ÐPWÑXÐXØ	�KÓ	 7¡?Ø‰?ØˆOÜ˜8 U¨GÓ4Ð4äØOÐRYÑYó
ð 	
ó    c                óð   • [        U [        R                  5      (       a  [        S U R                  SS9S-   nU$ [
        R                  " U 5      nUb!  UR                  S:w  a  UR                  S-   nU$ SnU$ )NT)r	   Ú.ÚbuiltinsÚ )r   r   r   r    Ú__self__r   Ú	getmoduler   )r#   r   Úmodules      r'   r   r   z   sw   € Ü�%œ×)Ñ)×*Ñ*Ü˜˜eŸn™n°dÑ;¸cÑAˆð €Kô ×"Ò" 5Ó)ˆØÑ &§/¡/°ZÓ"?Ø—?‘? SÑ(ˆDð €Kð ˆDØ€Kr(   c                óŠ   • [         R                  " U 5      (       a  [        U R                  5      $ [	        [        U 5      5      $ )zkReturns a string of the value's type with an indefinite article.

For example 'an Image' or 'a PlotValue'.
)r   r   r   r   Úclass_ofr   )r#   s    r'   r1   r1   †   s1   € ô
 ‡‚�u×ÑÜ˜5Ÿ>™>Ó*Ð*äœ˜U›Ó$Ð$r(   c                óð   • U(       a  SU -   nOH[         R                  " S5      R                  SU 5      nUSS R                  5       S;   a  SU -   nOSU -   nU(       a  US	   R	                  5       USS -   $ U$ )
a´  Returns the string with a prepended article.

The input does not need to begin with a character.

Parameters
----------
name : str
    Name to which to prepend an article
definite : bool (default: False)
    Whether the article is definite or not.
    Indefinite articles being 'a' and 'an',
    while 'the' is definite.
capital : bool (default: False)
    Whether the added article should have
    its first letter capitalized or not.
zthe z[\W_]+r,   Né   Úaeiouzan za r   )ÚreÚcompileÚsubr   Úupper)r   Údefiniter
   r%   Úfirst_letterss        r'   r   r   ‘   sy   € ö" Ø˜$‘‰äŸ
š
 9Ó-×1Ñ1°"°dÓ;ˆØ˜˜!Ð×"Ñ"Ó$¨Ó/Ø˜T‘\‰Fà˜D‘[ˆFÞØ�a‰y�‰Ó  6¨!¨" :Ñ-Ð-àˆr(   c                ó*   • [        U 5      nU < SU< 3$ )zUReturn a string representation of a value and its type for readable

error messages.
r   )r   )ÚobjÚthe_types     r'   Ú	repr_typer>   °   s   € ô
 �C‹y€HØ‰W�A�h‘\Ð"Ð"r(   )NFF)r"   ú
str | Noner#   r   r   r?   r	   Úboolr
   r@   Úreturnr   )r#   r   rA   r   )r#   r   rA   r   )FF)r   r   r9   r@   r
   r@   rA   r   )r<   r   rA   r   )Ú
__future__r   r   r5   r   Útypingr   r    r   r1   r   r>   © r(   r'   Ú<module>rE      sx   ðÝ "ã Û 	Û Ý ð ØØðn
Øðn
àðn
ð ðn
ð ð	n
ð
 ðn
ð 	õn
ôb	ô%öõ>#r(   