
    !<iJ	                         d dl Z d dlZd dlmZmZmZ d dlmZ ddlm	Z	  G d de j
                  Z G d d	e          ZdS )
    N)AnyIterableMapping)Self   )
CACHE_SIZEc                       e Zd ZU i Zeeee         ej	        f         e
eef         f         ed<   edej	        de
eef         fd            ZdS )
Annotation_cache	signaturereturnc                 @   | |f}|| j         v r6t          j        t          | j                   ddi           | j         |         S i }|j                                        D ]\  }}|j        t          j        j	        k    r 	 |j        j
        }n# t          $ r Y :w xY w|D ]J}t          ||           r|||<   t          |t                    rt          ||           r |            ||<   K|| j         |<   t          j        t          | j                   ddi           |S )Ncache
annotation)r   r   setlen
parametersitemsr   inspect	Parameterempty__metadata__AttributeError
isinstancetype
issubclass)clsr   key	annotated
param_nameparammetadataarg_types           /Users/kimhansen/Desktop/03 Workspace/ceo-agents/chl-effectiveness/mcp-servers/whoop/.venv/lib/python3.11/site-packages/docket/annotations.pyannotated_parameterszAnnotation.annotated_parameters   sP   I#*N3sz??Wl,CDDD:c?"%'	!*!5!;!;!=!= 	7 	7J7#4#:::*/*:*G!    % 7 7h,, 7,4Ij))$// 7Jx4M4M 7,4HJJIj)	7 $
3s3:,(?@@@s    B
BBN)__name__
__module____qualname__r   dicttupler   r   r   	Signaturer   str__annotations__classmethodr%        r$   r
   r
   
   s         MOFDtDz7#445wsDy7IIJOOOW-> 73PT9CU    [  r0   r
   c                   D    e Zd ZU dZdZeed<   d	deddfdZdede	fdZ
dS )
Loggeda(  Instructs docket to include arguments to this parameter in the log.

    If `length_only` is `True`, only the length of the argument will be included in
    the log.

    Example:

    ```python
    @task
    def setup_new_customer(
        customer_id: Annotated[int, Logged],
        addresses: Annotated[list[Address], Logged(length_only=True)],
        password: str,
    ) -> None:
        ...
    ```

    In the logs, you's see the task referenced as:

    ```
    setup_new_customer(customer_id=123, addresses[len 2], password=...)
    ```
    Flength_onlyr   Nc                     || _         d S )N)r3   )selfr3   s     r$   __init__zLogged.__init__E   s    &r0   argumentc                 "   | j         rzt          |t          t          f          rdt	          |           dS t          |t
                    rdt	          |           dS t          |d          rdt	          |           dS t          |          S )Nz{len }z(len )__len__z[len ])r3   r   r)   r   r   r*   hasattrrepr)r5   r7   s     r$   formatzLogged.formatH   s     	0(T3K00 01H1111He,, 0/s8}}////9-- 0/s8}}////H~~r0   )F)r&   r'   r(   __doc__r3   boolr-   r6   r   r,   r?   r/   r0   r$   r2   r2   *   s{          0 K' 'D 'T ' ' ' '	s 	s 	 	 	 	 	 	r0   r2   )abcr   typingr   r   r   typing_extensionsr   instrumentationr   ABCr
   r2   r/   r0   r$   <module>rG      s    



  ) ) ) ) ) ) ) ) ) ) " " " " " " ' ' ' ' ' '       @' ' ' ' 'Z ' ' ' ' 'r0   