U
ÀÒ.e ã @ s8 d dl mZmZ d dlmZ d dlmZmZ dd„ ZdS )é )ÚPY2ÚPY3)ÚUniversalDetector)Ú__version__ÚVERSIONc C sH t | tƒs0t | tƒs(td t| ƒ¡ƒ‚nt| ƒ} 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 ZfeedÚclose)Zbyte_strZdetector© r ú@/usr/lib/python3.8/site-packages/pip/_vendor/chardet/__init__.pyÚdetect s
ÿ
r N) Úcompatr r Zuniversaldetectorr Úversionr r r r r r r Ú