
    3jQ                     2    d Z ddlmZmZ dZdededz  fdZy)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                     | sy| j                  dt              }|st        ddd      S |j                  dd      ryt	        |      t	        |       z  }|t
        k  rt        ddd      S y)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_fractions      C/DATA/.local/lib/python3.12/site-packages/chardet/pipeline/ascii.pydetect_asciir      sm     t%56IC$OO#&	NSY.M**D4PPr   )__doc__chardet.pipeliner   r   r   bytesr    r   r   <module>r      s/    ?  u 4!7 r   