o
    jQ                     @   s2   d Z ddlmZmZ dZdededB fddZdS )	zStage 1c: Pure ASCII detection (with null-separator tolerance).

Note: ``from __future__ import annotations`` is intentionally omitted because
this module is compiled with mypyc, which does not support PEP 563 string
annotations.
    )ASCII_TEXT_BYTESDetectionResultg?datareturnNc                 C   s`   | sdS |  dt}|stddddS |ddrdS t|t|  }|tkr.tddddS dS )al  Return an ASCII result if all bytes are printable ASCII plus common whitespace.

    Tolerates sparse null bytes (``\x00``) up to ``_MAX_NULL_FRACTION`` of
    the data, returning confidence 0.99 instead of 1.0 to distinguish from
    pure ASCII.

    :param data: The raw byte data to examine.
    :returns: A :class:`DetectionResult` for ASCII, or ``None``.
    Nasciig      ?)encoding
confidencelanguage        gGz?)	translater   r   replacelen_MAX_NULL_FRACTION)r   	remaindernull_fraction r   \/var/www/html/fyndo/pharma/fyndo/venv/lib/python3.10/site-packages/chardet/pipeline/ascii.pydetect_ascii   s   
r   )__doc__chardet.pipeliner   r   r   bytesr   r   r   r   r   <module>   s    