
    i                     8    S SK r S SKJr  S SKJr   " S S5      rg)    N)Callable)Anyc                   `   ^  \ rS rSrSrS\SS4S jrS\S\4S jr	S\S	\SS4U 4S
 jjr
SrU =r$ )ThreadLocal   a  
Manages thread-local state. ThreadLocal forwards getattr and setattr to a
threading.local() instance. The passed kwargs defines the available attributes
on the threadlocal and their default values.

The only supported names to geattr and setattr are the keys of the passed kwargs.
kwargsreturnNc                     UR                  5        H&  u  p#[        U5      (       a  M  [        SU SU 35      e   SU l        Xl        [
        R                  " 5       U l        SU l        g )Nz
Attribute z must be a callable. Got FT)itemscallable	TypeError_ThreadLocal__initialized_ThreadLocal__kwargs	threadinglocal_ThreadLocal__threadlocal)selfr   namevalues       Y/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/utils/threading.py__init__ThreadLocal.__init__   s\    !<<>KDE??*TF2KE7 STT * #&__.!    r   c                     XR                   ;  a  [        SU 35      e[        U R                  U5      (       d*  U R                   U   " 5       n[	        U R                  X5        [        U R                  U5      $ )NNo attribute )r   AttributeErrorhasattrr   setattrgetattr)r   r   defaults      r   __getattr__ThreadLocal.__getattr__#   se    }}$ =!788t))400mmD)+GD&&6t))400r   r   c                    > SU R                   ;  d  U R                  (       d  [        TU ]  X5        g XR                  ;  a  [        SU 35      e[        U R                  X5        g )Nr   r   )__dict__r   super__setattr__r   r   r   r   )r   r   r   	__class__s      r   r&   ThreadLocal.__setattr__-   sP    &dmm;4CUCUG,==($}TF%;<<D&&4r   )__initialized__kwargs__threadlocal)__name__
__module____qualname____firstlineno____doc__r   r   strr   r!   r&   __static_attributes____classcell__)r'   s   @r   r   r      sM    " "d "1 1 15 5C 5D 5 5r   r   )r   collections.abcr   typingr   r    r   r   <module>r7      s     $ $5 $5r   