U
    É¼µb  ã                   @   s8   d dl mZmZ d dlmZ d dlmZmZ dd„ ZdS )é   )ÚPY2ÚPY3)ÚUniversalDetector)Ú__version__ÚVERSIONc                 C   sH   t | tƒs0t | tƒs(td t| ƒ¡ƒ‚nt| ƒ} tƒ }| | ¡ | ¡ S )z£
    Detect the encoding of the given byte string.

    :param byte_str:     The byte sequence to examine.
    :type byte_str:      ``bytes`` or ``bytearray``
    z4Expected object of type bytes or bytearray, got: {0})	Ú
isinstanceÚ	bytearrayÚbytesÚ	TypeErrorÚformatÚtyper   ÚfeedÚclose)Úbyte_strÚdetector© r   ú4/tmp/pip-unpacked-wheel-uf68vprk/chardet/__init__.pyÚdetect   s    

ÿ
r   N)	Úcompatr   r   Úuniversaldetectorr   Úversionr   r   r   r   r   r   r   Ú<module>   s   