U
    ß{Zgd  ã                   @   s(   d dl mZmZ d dlmZ dd„ ZdS )é    )ÚurlparseÚparse_qs)Úadd_params_to_uric                    s   ‡ fdd„}ˆ   d|¡ ˆ S )Nc                    sˆ   t tt| ƒjƒƒ}| d¡}|s4t|t ƒr4| d¡}|rB| ||fS |sRdˆ ji}n,t|t ƒrhˆ j|d< ndˆ jfg}t| |ƒ} | ||fS )NÚtoken)Údictr   r   ÚqueryÚgetÚ
isinstanceZaccess_tokenr   )ÚurlÚheadersÚdataZ	url_queryr   ©Úsession© úL/tmp/pip-unpacked-wheel-dr3g6iil/requests_oauthlib/compliance_fixes/slack.pyÚ_non_compliant_param_name   s    




z7slack_compliance_fix.<locals>._non_compliant_param_nameZprotected_request)Zregister_compliance_hook)r   r   r   r   r   Úslack_compliance_fix   s    r   N)Úurllib.parser   r   Zoauthlib.commonr   r   r   r   r   r   Ú<module>   s   