o
    È·e  ã                   @   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   sF   t | tƒst | tƒstd t| ƒ¡ƒ‚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   úG/var/www/ideatree/venv/lib/python3.10/site-packages/chardet/__init__.pyÚdetect   s   


ÿ
r   N)	Úcompatr   r   Úuniversaldetectorr   Úversionr   r   r   r   r   r   r   Ú<module>   s   