U
    ÷Ê	fu  ã                   @  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                   @  sš   e Zd ZdZdddœdd„Zeddœdd	„ƒZeddœd
d„ƒZeddœdd„ƒZe	eddœdd„ƒƒZ
ddœdd„Zddœdd„Zeddœdd„ƒZdS )Ú	LazyProxyzŽImplements data methods to pretend that an instance is another instance.

    This includes forwarding attribute access and othe methods.
    ÚstrÚobject)ÚattrÚreturnc                 C  s    |   ¡ }t|tƒr|S t||ƒS ©N)Ú__get_proxied__Ú
isinstancer   Úgetattr)Úselfr   Úproxied© r   úU/var/www/html/apigroqsegura/apigroq/lib/python3.8/site-packages/groq/_utils/_proxy.pyÚ__getattr__   s    
zLazyProxy.__getattr__)r   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__z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   Ú
__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
   