+
    Q(i                    6    R t ^ RIHt ^ RItR R ltR R ltR# )z Timeout normalization utilities.)annotationsNc                    V ^8  d   QhRRRR/# )   value'int | float | datetime.timedelta | Nonereturnzdatetime.timedelta | None )formats   "_/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/fastmcp/utilities/timeout.py__annotate__r      s     < <2<<    c                   V f   R# \        V \        P                  4      '       d   V # \        V \        \        ,          4      '       d!   \        P                  ! \	        V 4      R7      # \        R\        V 4       24      h)zNormalize a timeout value to a timedelta.

Args:
    value: Timeout value as int/float (seconds), timedelta, or None

Returns:
    timedelta if value provided, None otherwise
N)secondsInvalid timeout type: )
isinstancedatetime	timedeltaintfloat	TypeErrortype)r   s   &r
   normalize_timeout_to_timedeltar      sa     }%++,,%u%%!!%,77
,T%[M:
;;r   c                    V ^8  d   QhRRRR/# )r   r   r   r   zfloat | Noner   )r	   s   "r
   r   r      s     < <2<<r   c                   V f   R# \        V \        P                  4      '       d   V P                  4       pV^ 8X  d   R# T# \        V \        \
        ,          4      '       d   V ^ 8X  d   R# \        V 4      # \        R\        V 4       24      h)a  Normalize a timeout value to seconds (float).

Args:
    value: Timeout value as int/float (seconds), timedelta, or None.
        Zero values are treated as "disabled" and return None.

Returns:
    float seconds if value provided and non-zero, None otherwise
Nr   )r   r   r   total_secondsr   r   r   r   )r   r   s   & r
   normalize_timeout_to_secondsr      s{     }%++,,%%'!|t00%u%%zt3uU|3
,T%[M:
;;r   )__doc__
__future__r   r   r   r   r   r   r
   <module>r      s    & " <(<r   