
    h                        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           oC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\traitlets/utils/descriptions.pyr    r    	   s   | '3--/??5!!;''>>5>H,%GOGOOE4J4J z4&)F""6499Iu%%~~E5#5#566~~ 	E5#3#344~~.. 	e%%*  !3r%y>1E{u~,yyGPWXX	K	7??O8UG44ORY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    %))**ennd;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ay 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    
 CyHWAh\""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(   