^i B d dl mZ d dlmZ d dlmZmZ g dZd Zd Z dS ) )UniversalDetector)
InputState)__version__VERSION)r detect
detect_allr r c @ t | t sSt | 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``
3Expected object of type bytes or bytearray, got: {})
isinstance bytearraybytes TypeErrorformattyper feedclose)byte_strdetectors /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/chardet/__init__.pyr r s h ** +(E** + !!'X!7!79 9
9 !**H ""HMM(>> c $ t | t sSt | t s/t d t | t | } t
}| | | |j t j k rg }|j D ]}|
|j k r|j }|j }| d r"|j r|j || }| ||
|j d t/ | dk rt1 |d S |j gS )z
Detect all the possible encodings of the given byte string.
:param byte_str: The byte sequence to examine.
:type byte_str: ``bytes`` or ``bytearray``
r
ziso-8859)encoding
confidencelanguage c | d S )Nr )results r