
    dhv                       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Zddl	mZmZ ded<   es4 ed  e ed eeg          i           e          D                       ZddZddZ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                    | j         S N)__name__)r   s    e/home/jenkins/workspace/simtester-sanitize/venv/lib/python3.11/site-packages/automat/_runtimeproto.pyruntime_namer      s
    :    )
getmembers
isfunctionfrozenset[str]emptyProtocolMethodsc              #      K   | ]	\  }}|V  
d S r    .0nameeachs      r   	<genexpr>r      s:       % %D$ 	% % % % % %r   Exampleprotocolobjectc                j    t          d t          | t                    D                       t          z
  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              3      K   | ]	\  }}|V  
d S r   r   r   s      r   r   z1actuallyDefinedProtocolMethods.<locals>.<genexpr>*   s&      JJ:4$JJJJJJr   )	frozensetr   r   r   )r!   s    r   actuallyDefinedProtocolMethodsr&   !   s5     	JJHj)I)IJJJJJ
	r   methodCallable[..., object]itannNonec                    t          ||          }t          |t                    r&t          ||t	          || j                             d S d S r   )getattr
isinstancer   setattreval__globals__)r'   r)   r*   
annotations       r   _fixAnnotationr3   /   sR    S!!J*c"" ?Cj&*<==>>>>>? ?r   r	   c                    t          |           }|j                                        D ]}t          | |d           t          | |d           |S )z5
    Get a signature with evaluated annotations.
    _annotation_return_annotation)r   
parametersvaluesr3   )r'   resultparams      r   _liveSignaturer;   5   s\    
 vF"))++ 5 5vum444466#7888Mr   )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&   r3   r;   r   r   r   <module>rE      sd    
 # " " " " " 



 = = = = = = = = = = = = ( ( ( ( ( ( ( (GCLLRUO     + * * * * * * * $ $ $ $ $9 % %$*TT)UUH:5F5F%K%KZXX% % %     ? ? ? ?	 	 	 	 	 	r   