§
    £	Êjä  ã                   ó|   — d Z ddlZddlZ eed¦  «        r	ej        ZdS ej        Zej        Z G d„ de¦  «        ZdS )zšBackport of @functools.singledispatchmethod to Python <3.7.

Adapted from https://github.com/ikalnytskyi/singledispatchmethod
removing 2.7 specific code.
é    NÚsingledispatchmethodc            	       óx  — e Zd ZdZdej        dej        f         ddfd„Z	 ddej        dej        f         dej        ej        dej        f                  dej        dej        f         fd	„Z	d
ej        dej        ej        gej        f         dej        dej        f         fd„Z
edej        fd„¦   «         ZdS )r   aÌ  Single-dispatch generic method descriptor.

        TODO: Figure out how to type this:

        `mypy --strict` returns errors like the following for all decorated methods:
        "Untyped decorator makes function "send" untyped."

        But this is not a normal function-base decorator, it's a class and it
        doesn't have a __call__ method. When decorating the "base" method
        __init__ is called, but of course its return type is None.
        Úfunc.ÚreturnNc                 ó¾   — t          |¦  «        s2t          |d¦  «        s"t          d                     |¦  «        ¦  «        ‚t	          |¦  «        | _        || _        d S )NÚ__get__z${!r} is not callable or a descriptor)ÚcallableÚhasattrÚ	TypeErrorÚformatÚsingledispatchÚ
dispatcherr   )Úselfr   s     ú>C:\Projects\Muse2API\.venv\Lib\site-packages\socksio/compat.pyÚ__init__zsingledispatchmethod.__init__!   sZ   € Ý˜D‘>”>ð U­'°$¸	Ñ*BÔ*Bð UÝÐ F× MÒ MÈdÑ SÔ SÑTÔTÐTå,¨TÑ2Ô2ˆDŒOØˆDŒIˆIˆIó    ÚclsÚmethodc                 ó:   — | j                              ||¬¦  «        S )a  Register a method on a class for a particular type.

            Note in Python <= 3.6 this methods cannot infer the type from the
            argument's type annotation, users *must* supply it manually on
            decoration, i.e.

            @my_method.register(TypeToDispatch)
            def _(self, arg: TypeToDispatch) -> None:
                ...

            Versus in Python 3.7+:

            @my_method.register
            def _(self, arg: TypeToDispatch) -> None:
                ...

            )r   )r   Úregister)r   r   r   s      r   r   zsingledispatchmethod.register(   s   € ð4 ”?×+Ò+¨C°fÐ+Ñ=Ô=Ð=r   Úobjc                 ó¾   ‡ ‡‡— dt           j        dt           j        dt           j        fˆˆˆ fd„}‰ j        |_        ‰ j        |_        t	          |‰ j        ¦  «         |S )NÚargsÚkwargsr   c                  ó†   •— ‰j                              | d         j        ¦  «        } |                     ‰‰¦  «        | i |¤ŽS )Nr   )r   ÚdispatchÚ	__class__r   )r   r   r   r   r   r   s      €€€r   Ú_methodz-singledispatchmethod.__get__.<locals>._methodG   sB   ø€ Øœ×1Ò1°$°q´'Ô2CÑDÔD�Ø/�v—~’~ c¨3Ñ/Ô/°Ð@¸Ð@Ð@Ð@r   )ÚtypingÚAnyÚ__isabstractmethod__r   Úupdate_wrapperr   )r   r   r   r   s   ``` r   r   zsingledispatchmethod.__get__D   s�   øøø€ ðA�vœzð AµV´Zð AÅFÄJð Að Að Að Að Að Að Að Að ,0Ô+DˆGÔ(Ø#œ}ˆGÔÝ˜7 D¤IÑ.Ô.Ð.ØˆNr   c                 ó.   — t          | j        dd¦  «        S )Nr!   F)Úgetattrr   )r   s    r   r!   z)singledispatchmethod.__isabstractmethod__T   s   € å˜4œ9Ð&<¸eÑDÔDÐDr   )N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚCallabler    r   ÚOptionalr   r   Úpropertyr!   © r   r   r   r      s4  € € € € € ð
	ð 
	ð	 ¤°°f´j°Ô!Að 	Àdð 	ð 	ð 	ð 	ð IMð	>ð 	>à”  f¤j Ô1ð	>ð ”O F¤O°C¸¼°OÔ$DÔEð	>ð Œ_˜S &¤*˜_Ô-ð		>ð 	>ð 	>ð 	>ð8	Ø”zð	Ø(.¬¸¼¸ÀfÄjÐ8PÔ(Qð	àŒ_˜S &¤*˜_Ô-ð	ð 	ð 	ð 	ð  
ð	E¨&¬*ð 	Eð 	Eð 	Eñ 
Œð	Eð 	Eð 	Er   )r(   Ú	functoolsr   r
   r   r"   r   Úobjectr,   r   r   ú<module>r/      s¤   ððð ð Ð Ð Ð Ø €€€à
€7ˆ9Ð,Ñ-Ô-ð LEØ$Ô9ÐÐÐàÔ-€NØÔ-€NðBEð BEð BEð BEð BE˜vñ BEô BEð BEð BEð BEr   