%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/chardet/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/chardet/__pycache__/__init__.cpython-312.pyc |
� �d� � � � d dl mZmZ ddlmZ ddlmZ ddlmZ ddl m Z ddlmZ ddl mZmZ g d �Z dd eeef dede fd �Z dd eeef dededee fd�Zy)� )�List�Union� )�CharSetGroupProber)� CharSetProber)� InputState)� ResultDict)�UniversalDetector)�VERSION�__version__)r �detect� detect_allr r �byte_str�should_rename_legacy�returnc �� � t | t � s2t | t � st dt | � � �� �t | � } t |�� }|j | � |j � S )aV Detect the encoding of the given byte string. :param byte_str: The byte sequence to examine. :type byte_str: ``bytes`` or ``bytearray`` :param should_rename_legacy: Should we rename legacy encodings to their more modern equivalents? :type should_rename_legacy: ``bool`` �1Expected object of type bytes or bytearray, got: �r )� isinstance� bytearray�bytes� TypeError�typer �feed�close)r r �detectors �2/usr/lib/python3/dist-packages/chardet/__init__.pyr r sd � � �h� �*��(�E�*��C�D��N�CS�T�� � �X�&�� �6J�K�H��M�M�(���>�>��� �ignore_thresholdc �� � t | t � s2t | t � st dt | � � �� �t | � } t |�� }|j | � |j � |j t j k( �rNg }g }|j D ]F }t |t � r#|j d� |j D � � �6|j |� �H |D ]� }|s|j! � |j"