o
    j
                     @  s   U d Z ddlmZ ddlZddlmZ ddlmZ dZded< e	e
d	d
Zded< e	dddge
ddZded< G dd deZejdddG dd dZeddddZejddG dd dZdS )z+Detection pipeline stages and shared types.    )annotationsN)field)	TypedDictgffffff?floatDETERMINISTIC_CONFIDENCE      bytes
HIGH_BYTES	   
             ASCII_TEXT_BYTESc                   @  s2   e Zd ZU dZded< ded< ded< ded< dS )	DetectionDictzDictionary representation of a detection result.

    Returned by :func:`chardet.detect`, :func:`chardet.detect_all`,
    and :attr:`chardet.UniversalDetector.result`.
    
str | Noneencodingr   
confidencelanguage	mime_typeN)__name__
__module____qualname____doc____annotations__ r   r   _/var/www/html/fyndo/pharma/fyndo/venv/lib/python3.10/site-packages/chardet/pipeline/__init__.pyr      s   
 r   T)frozenslotsc                   @  s@   e Zd ZU dZded< ded< ded< dZded< dddZdS )DetectionResultzA single encoding detection result.

    Frozen dataclass holding the encoding name, confidence score, and
    optional language identifier returned by the detection pipeline.
    r   r   r   r   r   Nr   returnr   c                 C  s   | j | j| j| jdS )zConvert this result to a plain dict.

        :returns: A dict with ``'encoding'``, ``'confidence'``, ``'language'``, and ``'mime_type'`` keys.
        r   r   r   r   r"   )selfr   r   r   to_dict2   s
   zDetectionResult.to_dict)r!   r   )r   r   r   r   r   r   r$   r   r   r   r   r    %   s   
 r    g        )r   r   r   )r   c                   @  sT   e Zd ZU dZeedZded< dZded< eedZ	ded	< eedZ
ded
< dS )PipelineContexta)  Per-run mutable state for a single pipeline invocation.

    Created once at the start of ``run_pipeline()`` and threaded through
    the call chain via function parameters.  Each concurrent ``detect()``
    call gets its own context, eliminating the need for module-level
    mutable caches.
    )default_factoryz!dict[str, tuple[float, int, int]]analysis_cacheNz
int | Nonenon_ascii_countzdict[str, float]	mb_scoresmb_coverage)r   r   r   r   r   dictr'   r   r(   r)   r*   r   r   r   r   r%   D   s   
 r%   )r   
__future__r   dataclassesr   typingr   r   r   r	   ranger
   r   r   	dataclassr    _NONE_RESULTr%   r   r   r   r   <module>   s     
