o
    hn                     @  sb   d dl mZ d dlmZmZ d dlmZmZmZm	Z	 d dl
mZ edZG dd dee eZdS )	    )annotations)ABCabstractmethod)GenericTypeVarIterablecast)overrideTc                   @  sx   e Zd ZdZdddZeddd	Zedd
dZedddZe	edddZ
dddZdddZedddZdS )	LazyProxyzImplements data methods to pretend that an instance is another instance.

    This includes forwarding attribute access and other methods.
    attrstrreturnobjectc                 C  s    |   }t|tr|S t||S N)__get_proxied__
isinstancer   getattr)selfr   proxied r   f/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/groq/_utils/_proxy.py__getattr__   s   

zLazyProxy.__getattr__c                 C  s&   |   }t|tr|jjS t|   S r   )r   r   r   	__class____name__reprr   r   r   r   r   __repr__   s   
zLazyProxy.__repr__c                 C  s"   |   }t|tr|jjS t|S r   )r   r   r   r   r   r   r   r   r   r   __str__    s   
zLazyProxy.__str__Iterable[str]c                 C  s   |   }t|trg S | S r   )r   r   r   __dir__r   r   r   r   r    '   s   
zLazyProxy.__dir__typec                 C  s$   |   }tt|trt|S |jS r   )r   
issubclassr!   r   r   r   r   r   r   r   .   s   zLazyProxy.__class__r
   c                 C  s   |   S r   )__load__r   r   r   r   r   6   s   zLazyProxy.__get_proxied__c                 C  s
   t t| S )zHHelper method that returns the current proxy, typed as the loaded object)r   r
   r$   r   r   r   __as_proxied__9   s   
zLazyProxy.__as_proxied__c                 C  s   d S r   r   r$   r   r   r   r#   =   s   zLazyProxy.__load__N)r   r   r   r   )r   r   )r   r   )r   r!   )r   r
   )r   
__module____qualname____doc__r   r	   r   r   r    propertyr   r   r%   r   r#   r   r   r   r   r   
   s     


r   N)
__future__r   abcr   r   typingr   r   r   r   typing_extensionsr	   r
   r   r   r   r   r   <module>   s    