Ë
    �š¾jÃ  ã                   óž   — d Z ddlmZmZ  e«       Zd„ Zd„ Zd„ Z e	eee«      Z
d„ Z e	e«      Z G d„ de«      Z G d	„ d
e«      Zddddœd„Zy)aq  The `with_doc` decorator: override the docstring that introspection tools
see for a wrapped callable without mutating the wrapped function itself.
Accepts the docstring directly, or a factory that derives it from the
wrapped function at decoration time.

This is the companion of `with_signature`, which overrides the signature in
the same way. Assigning to `__doc__` on an ordinary wrapt wrapper writes
through to the wrapped function, because `__doc__` on every proxy delegates
to the wrapped object, so a wrapper carrying its own docstring is the only
way to change what is reported without touching the wrapped function.
é   )ÚBoundFunctionWrapperÚFunctionWrapperc                 óZ   — | j                   }|t        u r| j                  j                  S |S ©N©Ú	_self_docÚ_NO_DOC_OVERRIDEÚ__wrapped__Ú__doc__©ÚselfÚdocs     úS/home/spazio/kingdom_calls/work5/transenv/lib/python3.12/site-packages/wrapt/doc.pyÚ_get_docr   *   s+   € Ø
�.‰.€CØ
ÔÑØ×Ñ×'Ñ'Ð'Ø€Jó    c                 óZ   — | j                   t        u r|| j                  _        y || _         y r   r   )r   Úvalues     r   Ú_set_docr   1   s$   € Ø‡~�~Ô)Ñ)Ø#(ˆ×ÑÕ àˆ�r   c                 óX   — | j                   t        u r| j                  `y t        | _         y r   r   )r   s    r   Ú_del_docr   8   s"   € Ø‡~�~Ô)Ñ)Ø×ÑÑ$ä)ˆ�r   c                 ón   — | j                   j                  }|t        u r| j                  j                  S |S r   )Ú_self_parentr   r	   r
   r   r   s     r   Ú_get_bound_docr   F   s3   € Ø
×
Ñ
×
%Ñ
%€CØ
ÔÑØ×Ñ×'Ñ'Ð'Ø€Jr   c                   ó   — e Zd ZeZy)Ú_BoundDocFunctionWrapperN)Ú__name__Ú
__module__Ú__qualname__Ú_BOUND_DOC_PROPERTYr   © r   r   r   r   P   s   „ Ø!�Gr   r   c                   ó&   ‡ — e Zd ZeZeZˆ fd„Zˆ xZS )Ú_DocFunctionWrapperc                 ó4   •— t         ‰| �  ||«       || _        y r   )ÚsuperÚ__init__r   )r   ÚwrappedÚwrapperr   Ú	__class__s       €r   r%   z_DocFunctionWrapper.__init__Y   s   ø€ Ü‰Ñ˜ 'Ô*Øˆ�r   )	r   r   r   Ú_DOC_PROPERTYr   r   Ú__bound_function_wrapper__r%   Ú__classcell__)r(   s   @r   r"   r"   T   s   ø„ Ø€Gà!9Ð÷ð r   r"   N)r   Úfactoryc               óf   ‡‡— ‰€‰€t        d«      ‚‰�‰�t        d«      ‚ˆˆfd„}| €|S  || «      S )aD  Override the docstring of a wrapped callable.

    Exactly one of `doc` or `factory` must be supplied:

    - `doc`: the docstring to report.
    - `factory`: a callable `factory(wrapped)` invoked at decoration time
      that returns the docstring to report.

    The resulting wrapper reports the override as its `__doc__`, and so it
    is what `help()` and `pydoc` display. The wrapped function is not
    mutated, and assigning to `__doc__` on the wrapper replaces the override
    rather than writing through to the wrapped function. Calling behaviour
    is unchanged.
    z)with_doc requires one of doc= or factory=z-with_doc accepts only one of doc= or factory=c                 ó>   •— d„ }‰�	 ‰| «      }n‰}t        | ||«      S )Nc                 ó   —  | |i |¤ŽS r   r    )r&   ÚinstanceÚargsÚkwargss       r   Ú_wrapperz.with_doc.<locals>._decorator.<locals>._wrappert   s   € Ù˜DÐ+ FÑ+Ð+r   )r"   )r&   r3   Úresolvedr   r,   s      €€r   Ú
_decoratorzwith_doc.<locals>._decorators   s.   ø€ ò	,ð ÐÙ˜wÓ'‰HàˆHä" 7¨H°hÓ?Ð?r   )Ú	TypeError)r&   r   r,   r5   s    `` r   Úwith_docr7   ^   sN   ù€ ð  €{�w�ÜÐCÓDÐDØ
€˜7Ð.ÜÐGÓHÐHõ	@ð €ØÐÙ�gÓÐr   r   )r   Ú	__wrapt__r   r   Úobjectr	   r   r   r   Úpropertyr)   r   r   r   r"   r7   r    r   r   ú<module>r;      sq   ðñ
÷ =ñ “8Ð ò.òò*ñ ˜ 8¨XÓ6€òñ ˜~Ó.Ð ô"Ð3ô "ô˜/ô ð" T°4õ "r   