ó
    {ñ:iS  ã                   óp   • S SK r SSKJr  S r " S S5      r " S S\5      r " S	 S
5      rS r\" 5       r	g)é    Né   )Ú_apic                 ó   ^ • U 4S jnU$ )a¤  
Decorator for defining the kwdoc documentation of artist properties.

This decorator can be applied to artist property setter methods.
The given text is stored in a private attribute ``_kwarg_doc`` on
the method.  It is used to overwrite auto-generated documentation
in the *kwdoc list* for artists. The kwdoc list is used to document
``**kwargs`` when they are properties of an artist. See e.g. the
``**kwargs`` section in `.Axes.text`.

The text should contain the supported types, as well as the default
value if applicable, e.g.:

    @_docstring.kwarg_doc("bool, default: :rc:`text.usetex`")
    def set_usetex(self, usetex):

See Also
--------
matplotlib.artist.kwdoc

c                 ó   >• TU l         U $ ©N)Ú
_kwarg_doc)ÚfuncÚtexts    €ÚX/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/matplotlib/_docstring.pyÚ	decoratorÚkwarg_doc.<locals>.decorator   s   ø€ ØˆŒØˆó    © )r
   r   s   ` r   Ú	kwarg_docr      s   ø€ õ,ð Ðr   c                   ó$   • \ rS rSrSrS rS rSrg)ÚSubstitutioné"   a  
A decorator that performs %-substitution on an object's docstring.

This decorator should be robust even if ``obj.__doc__`` is None (for
example, if -OO was passed to the interpreter).

Usage: construct a docstring.Substitution with a sequence or dictionary
suitable for performing substitution; then decorate a suitable function
with the constructed object, e.g.::

    sub_author_name = Substitution(author='Jason')

    @sub_author_name
    def some_function(x):
        "%(author)s wrote this function"

    # note that some_function.__doc__ is now "Jason wrote this function"

One can also use positional arguments::

    sub_first_last_names = Substitution('Edgar Allen', 'Poe')

    @sub_first_last_names
    def some_function(x):
        "%s %s wrote the Raven"
c                 óV   • U(       a  U(       a  [        S5      eU=(       d    UU l        g )Nz+Only positional or keyword args are allowed)Ú	TypeErrorÚparams)ÚselfÚargsÚkwargss      r   Ú__init__ÚSubstitution.__init__=   s   € Þ–FÜÐIÓJÐJØ—n˜fˆ�r   c                 óŒ   • UR                   (       a2  [        R                  " UR                   5      U R                  -  Ul         U$ r   )Ú__doc__ÚinspectÚcleandocr   )r   r	   s     r   Ú__call__ÚSubstitution.__call__B   s-   € Ø�<�<Ü"×+Ò+¨D¯L©LÓ9¸D¿K¹KÑGˆDŒLØˆr   ©r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   r    Ú__static_attributes__r   r   r   r   r   "   s   † ñò4%õ
r   r   c                   ó   • \ rS rSrS rSrg)Ú_ArtistKwdocLoaderéH   c                 ó$  ^• UR                  S5      (       d  [        U5      eUS [        S5      *  mSSKJnJn   U4S j[        R                  " U5       5       u  nU R                  X" U5      5      $ ! [         a  n[        U5      UeS nAff = f)Nz:kwdocr   )ÚArtistÚkwdocc              3   óL   >#   • U  H  nUR                   T:X  d  M  Uv •  M     g 7fr   )r#   )Ú.0ÚclsÚnames     €r   Ú	<genexpr>Ú1_ArtistKwdocLoader.__missing__.<locals>.<genexpr>O   s&   øé € ð -Ò#D˜CØ—|‘| tÑ+÷ ‘CÒ#Dùs   ƒ$›	$)
ÚendswithÚKeyErrorÚlenÚmatplotlib.artistr,   r-   r   Úrecursive_subclassesÚ
ValueErrorÚ
setdefault)r   Úkeyr,   r-   r0   Úer1   s         @r   Ú__missing__Ú_ArtistKwdocLoader.__missing__I   s†   ø€ Ø�|‰|˜H×%Ñ%Ü˜3“-ÐØ�?”S˜“]�NÐ#ˆß3ð	'ô-¤4×#<Ò#<¸VÔ#Dó -‰DˆCð �‰˜s E¨#£JÓ/Ð/øô ó 	'Ü˜3“- QÐ&ûð	'ús   »"A4 Á4
BÁ>B
Â
Br   N)r#   r$   r%   r&   r=   r'   r   r   r   r)   r)   H   s   † õ
0r   r)   c                   ó*   • \ rS rSrSrS rS rS rSrg)Ú_ArtistPropertiesSubstitutionéV   a  
A class to substitute formatted placeholders in docstrings.

This is realized in a single instance ``_docstring.interpd``.

Use `~._ArtistPropertiesSubstition.register` to define placeholders and
their substitution, e.g. ``_docstring.interpd.register(name="some value")``.

Use this as a decorator to apply the substitution::

    @_docstring.interpd
    def some_func():
        '''Replace %(name)s.'''

Decorating a class triggers substitution both on the class docstring and
on the class' ``__init__`` docstring (which is a commonly required
pattern for Artist subclasses).

Substitutions of the form ``%(classname:kwdoc)s`` (ending with the
literal ":kwdoc" suffix) trigger lookup of an Artist subclass with the
given *classname*, and are substituted with the `.kwdoc` of that class.
c                 ó"   • [        5       U l        g r   )r)   r   )r   s    r   r   Ú&_ArtistPropertiesSubstitution.__init__n   s   € Ü(Ó*ˆ�r   c                 ó<   • U R                   R                  " S0 UD6  g)z 
Register substitutions.

``_docstring.interpd.register(name="some value")`` makes "name" available
as a named parameter that will be replaced by "some value".
Nr   )r   Úupdate)r   r   s     r   ÚregisterÚ&_ArtistPropertiesSubstitution.registerq   s   € ð 	�‰×ÒÑ$˜VÓ$r   c                 ó  • UR                   (       a2  [        R                  " UR                   5      U R                  -  Ul         [	        U[
        5      (       a0  UR                  [        R                  :w  a  U " UR                  5        U$ r   )r   r   r   r   Ú
isinstanceÚtyper   Úobject)r   Úobjs     r   r    Ú&_ArtistPropertiesSubstitution.__call__z   sU   € Ø�;�;Ü!×*Ò*¨3¯;©;Ó7¸$¿+¹+ÑEˆCŒKÜ�cœ4× Ñ  S§\¡\´V·_±_Ó%DÙ�—‘ÔØˆ
r   r"   N)	r#   r$   r%   r&   r   r   rF   r    r'   r   r   r   r@   r@   V   s   † ñò.+ò%õr   r@   c                 ó   ^ • U 4S jnU$ )z;Copy a docstring from another source function (if present).c                 óL   >• TR                   (       a  TR                   U l         U $ r   )r   )ÚtargetÚsources    €r   Údo_copyÚcopy.<locals>.do_copy„   s   ø€ Ø�>�>Ø#Ÿ^™^ˆFŒNØˆr   r   )rQ   rR   s   ` r   ÚcopyrT   ‚   s   ø€ õð €Nr   )
r   Ú r   r   r   Údictr)   r@   rT   Úinterpdr   r   r   Ú<module>rX      sA   ðÛ å ò÷8#ñ #ôL0˜ô 0÷)ñ )òXñ (Ó
)�r   