o
    €Ýh  ã                   @   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)Zbyte_strZdetector© r   úX/var/www/html/magazine_api/magazine_env/lib/python3.10/site-packages/chardet/__init__.pyÚdetect   s   


ÿ
r   N)	Úcompatr   r   Zuniversaldetectorr   Úversionr   r   r   r   r   r   r   Ú<module>   s   