o
    >hv                     @  s   U d Z ddlmZ ddlZddlmZmZmZmZ ddl	m
Z
mZ edZeg ef Zd!ddZddl	mZmZ ded< esQedd eedeegi eD Zd"ddZd#ddZd$dd ZdS )%zV
Workaround for U{the lack of TypeForm
<https://github.com/python/mypy/issues/9773>}.
    )annotationsN)TYPE_CHECKINGCallableProtocolTypeVar)	signature	SignatureTxProtocolAtRuntime[T]returnstrc                 C  s   | j S N)__name__)r
    r   u/var/www/vedio/testing/chatpythonscript.ninositsolution.com/env/lib/python3.10/site-packages/automat/_runtimeproto.pyruntime_name   s   r   )
getmembers
isfunctionfrozenset[str]emptyProtocolMethodsc                 c      | ]\}}|V  qd S r   r   .0nameeachr   r   r   	<genexpr>   s
    
r   Exampleprotocolobjectc                 C  s   t dd t| tD t S )z
    Attempt to ignore implementation details, and get all the methods that the
    protocol actually defines.

    that includes locally defined methods and also those defined in inherited
    superclasses.
    c                 s  r   r   r   r   r   r   r   r   *   s    z1actuallyDefinedProtocolMethods.<locals>.<genexpr>)	frozensetr   r   r   )r   r   r   r   actuallyDefinedProtocolMethods!   s   	r!   methodCallable[..., object]itannNonec                 C  s0   t ||}t|trt||t|| j d S d S r   )getattr
isinstancer   setattreval__globals__)r"   r$   r%   
annotationr   r   r   _fixAnnotation/   s   

r-   r   c                 C  s4   t | }|j D ]}t| |d q	t| |d |S )z5
    Get a signature with evaluated annotations.
    _annotation_return_annotation)r   
parametersvaluesr-   )r"   resultparamr   r   r   _liveSignature5   s
   r4   )r
   r   r   r   )r   r   r   r   )r"   r#   r$   r   r%   r   r   r&   )r"   r#   r   r   )__doc__
__future__r   systypingr   r   r   r   inspectr   r   r	   ProtocolAtRuntimer   r   r   __annotations__r    typetupler   r!   r-   r4   r   r   r   r   <module>   s"    


